From 4221e321cc8b3575186092ac97211f53acc3e6b8 Mon Sep 17 00:00:00 2001 From: Andrew Roth Date: Wed, 4 Dec 2024 10:20:09 -0500 Subject: [PATCH] add back workflow for build-deploy-ecs --- .github/workflows/build-deploy-ecs.yml | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build-deploy-ecs.yml diff --git a/.github/workflows/build-deploy-ecs.yml b/.github/workflows/build-deploy-ecs.yml new file mode 100644 index 0000000..9a90cb6 --- /dev/null +++ b/.github/workflows/build-deploy-ecs.yml @@ -0,0 +1,37 @@ +name: Build & Deploy ECS + +on: + push: + branches: + # Automatically build and deploy master and staging. Additional branches may be added. + # - main + - staging + workflow_dispatch: + # Allows manual build and deploy of any branch/ref + inputs: + auto-deploy: + type: boolean + description: Deploy image after building? + required: true + default: 'false' + +jobs: + # Build and push container image to ECR. Builds occur in the project repository. + build: + name: Build + uses: CruGlobal/.github/.github/workflows/build-ecs.yml@v1 + + # Triggers an ECS deployment in https://github.com/CruGlobal/cru-deploy/actions. + # All deployments happen in the cru-deploy repo. + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: build + if: github.event_name != 'workflow_dispatch' || github.event.inputs.auto-deploy == 'true' + steps: + - uses: CruGlobal/.github/actions/trigger-deploy@v1 + with: + github-token: ${{ secrets.CRU_DEPLOY_GITHUB_TOKEN }} + project-name: ${{ needs.build.outputs.project-name }} + environment: ${{ needs.build.outputs.environment }} + build-number: ${{ needs.build.outputs.build-number }}