File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 8282
8383 - name : Invalidate Cloudfront
8484 run : aws cloudfront create-invalidation --distribution-id ${{ steps.terragrunt_output.outputs.distribution_id }} --paths "/*"
85+
86+ - name : Check for uncommitted changes
87+ run : |
88+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
89+
90+ echo "Git status after build:"
91+ git status
92+
93+ CHANGES="$(git status --porcelain)"
94+ if [ -n "$CHANGES" ]; then
95+ echo "❌ Uncommitted changes detected in the repository."
96+ echo "These files changed (format: XY path):"
97+ echo "$CHANGES"
98+
99+ echo "::error::Your deployment produced uncommitted changes. \
100+ This usually means something should be added to .gitignore or a lockfile/other tracked file needs updating."
101+ exit 1
102+ else
103+ echo "✅ No uncommitted changes after deploy."
104+ fi
105+
You can’t perform that action at this time.
0 commit comments