Fix two ECS deploy workflow conditionals - #109
Merged
saqibmanan merged 2 commits intoAug 18, 2026
Merged
Conversation
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.
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.
This was referenced Aug 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the ECS CD-pipeline plan. Stacked on #108 — merge that first, this retargets to
devautomatically.Two independent correctness fixes in
deploy-to-ecs.yml, found while reading it for the smoke-gate/rollback work that follows:deploy-infrastructure'sif: contains(github.event.head_commit.modified, 'aws/cloudformation')only works for single-commit pushes —head_commitisn't populated for a squash-merge, so a CloudFormation change could silently skip infra sync. The CFN deploy is already documented as idempotent (--no-fail-on-empty-changeset), so simplest robust fix is to just run it every push rather than chase a correct multi-commit diff condition. Costs one extra idempotentaws cloudformation deploycall (~10-20s) per deploy.deploy-app'sif: always()made it run even on a cancelled workflow. Now thatdeploy-infrastructurealways runs (previous commit), it can never legitimately be'skipped'either, so dropping theif:entirely and relying on the implicitneeds:gating (success-only, false on cancellation) is the correct behavior — no explicit condition needed.Test plan
actionlinton the modified workflow — no new findings (pre-existing findings are all on lines this PR doesn't touch: outdated action versions, unrelatedSC2086quoting)