forked from cartsnitch/cartsnitch
fix(deploy): guard commit step against no-op changes
Guard the infra commit step in deploy-dev and deploy-uat jobs with `git diff --cached --quiet` to prevent CI failure when kustomization has no actual image tag changes. Refs: CAR-674 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -553,6 +553,7 @@ jobs:
|
||||
git config user.name "cartsnitch-ci[bot]"
|
||||
git config user.email "cartsnitch-ci[bot]@users.noreply.github.com"
|
||||
git add apps/overlays/dev/kustomization.yaml
|
||||
git diff --cached --quiet && echo "No image changes to deploy" && exit 0
|
||||
git commit -m "ci(dev): update cartsnitch, auth, receiptwitness, and api images"
|
||||
git pull --rebase origin main
|
||||
git push origin main
|
||||
@@ -651,6 +652,7 @@ jobs:
|
||||
git config user.name "cartsnitch-ci[bot]"
|
||||
git config user.email "cartsnitch-ci[bot]@users.noreply.github.com"
|
||||
git add apps/overlays/uat/kustomization.yaml
|
||||
git diff --cached --quiet && echo "No image changes to deploy" && exit 0
|
||||
git commit -m "ci(uat): update cartsnitch, auth, receiptwitness, and api images"
|
||||
git pull --rebase origin main
|
||||
git push origin main
|
||||
|
||||
Reference in New Issue
Block a user