From 2ada230e01ca42244e8e386b060614964ec63e39 Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 17 Aug 2026 21:32:58 +0530 Subject: [PATCH 1/2] fix: always run the CloudFormation deploy, don't guess from head_commit github.event.head_commit.modified is only populated for single-commit pushes -- a squash-merge touching aws/cloudformation would silently skip infra sync. The CFN deploy is already idempotent (--no-fail-on-empty-changeset), so simplest robust fix is to just run it every time; costs one extra ~10-20s idempotent call per deploy. --- .github/workflows/deploy-to-ecs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-to-ecs.yml b/.github/workflows/deploy-to-ecs.yml index 4fe14158..73a5dbb1 100644 --- a/.github/workflows/deploy-to-ecs.yml +++ b/.github/workflows/deploy-to-ecs.yml @@ -27,7 +27,6 @@ jobs: name: Deploy Infrastructure runs-on: ubuntu-latest environment: development - if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.modified, 'aws/cloudformation') steps: - name: Checkout From abeb9d16404a01ea7944918ce3f362b4eeb9f3eb Mon Sep 17 00:00:00 2001 From: Saqib Date: Mon, 17 Aug 2026 21:33:29 +0530 Subject: [PATCH 2/2] fix: stop deploy-app running on a cancelled workflow if: always() made this job run even if the workflow was cancelled before it started. Now that deploy-infrastructure always runs (prior commit), it can never legitimately be 'skipped' either, so the implicit needs: gating (success-only, false on cancellation) is exactly the behavior wanted -- no explicit if: needed. --- .github/workflows/deploy-to-ecs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-to-ecs.yml b/.github/workflows/deploy-to-ecs.yml index 73a5dbb1..5487b8f6 100644 --- a/.github/workflows/deploy-to-ecs.yml +++ b/.github/workflows/deploy-to-ecs.yml @@ -61,7 +61,6 @@ jobs: runs-on: ubuntu-latest environment: development needs: deploy-infrastructure - if: always() # Run even if infrastructure deployment is skipped steps: - name: Checkout