From 8dec8eeedd77a2da2f65dc1dcb8700dc7dc7d11e Mon Sep 17 00:00:00 2001 From: Alejo Thomas Ortega Date: Tue, 16 Jan 2024 14:13:38 -0300 Subject: [PATCH] feat: add GH actions --- .../{Build_LODs.yml => build-app.yml} | 0 .github/workflows/docker-next.yml | 14 ++++++++ .github/workflows/docker-release.yml | 14 ++++++++ .github/workflows/manual-deploy.yml | 34 +++++++++++++++++++ .github/workflows/pr.yml | 11 ++++++ .github/workflows/validate-pr-title.yml | 9 +++++ 6 files changed, 82 insertions(+) rename .github/workflows/{Build_LODs.yml => build-app.yml} (100%) create mode 100644 .github/workflows/docker-next.yml create mode 100644 .github/workflows/docker-release.yml create mode 100644 .github/workflows/manual-deploy.yml create mode 100644 .github/workflows/pr.yml create mode 100644 .github/workflows/validate-pr-title.yml diff --git a/.github/workflows/Build_LODs.yml b/.github/workflows/build-app.yml similarity index 100% rename from .github/workflows/Build_LODs.yml rename to .github/workflows/build-app.yml diff --git a/.github/workflows/docker-next.yml b/.github/workflows/docker-next.yml new file mode 100644 index 00000000..d74f841b --- /dev/null +++ b/.github/workflows/docker-next.yml @@ -0,0 +1,14 @@ +name: CI/CD on main branch + +on: + push: + branches: + - "main" + +jobs: + cd: + uses: decentraland/platform-actions/.github/workflows/apps-docker-next.yml@main + with: + service-name: lods-generator + deployment-environment: dev + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 00000000..678b4412 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,14 @@ +name: Publish 'latest' image + +on: + release: + types: + - "created" + +jobs: + cd: + uses: decentraland/platform-actions/.github/workflows/apps-docker-release.yml@main + with: + service-name: lods-generator + deployment-environment: prd + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml new file mode 100644 index 00000000..9d185706 --- /dev/null +++ b/.github/workflows/manual-deploy.yml @@ -0,0 +1,34 @@ +name: Manual deployment + +on: + workflow_dispatch: + inputs: + deployment-environment: + required: true + type: choice + options: + - prd + - dev + default: prd + description: Environment + tag: + required: true + default: "latest" + type: string + description: "Docker tag (quay.io)" + +jobs: + deployment: + if: ${{ inputs.deployment-environment }} + name: "Deploy to: ${{ inputs.deployment-environment }}" + runs-on: ubuntu-latest + environment: ${{ inputs.deployment-environment }} + steps: + - name: Trigger deployment + id: deploy + uses: decentraland/dcl-deploy-action@main + with: + dockerImage: "quay.io/decentraland/lods-generator:${{ inputs.tag }}" + serviceName: "lods-generator" + env: ${{ inputs.deployment-environment }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..1797bba7 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,11 @@ +name: CI/CD on PR + +on: + pull_request: + +jobs: + pr: + uses: decentraland/platform-actions/.github/workflows/apps-pr.yml@main + with: + service-name: lods-generator + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.yml new file mode 100644 index 00000000..39b8665c --- /dev/null +++ b/.github/workflows/validate-pr-title.yml @@ -0,0 +1,9 @@ +name: validate-pr-title + +on: + pull_request: + types: [edited, opened, reopened, synchronize] + +jobs: + title-matches-convention: + uses: decentraland/actions/.github/workflows/validate-pr-title.yml@main \ No newline at end of file