fix: handle concurrent pushes in build workflow

Add git pull --rebase before pushing deployment.yaml update
to handle race conditions when multiple builds run.
This commit is contained in:
Graham McIntire 2026-03-04 17:33:10 -06:00
parent 65b41f82fe
commit f1b61513d6
No known key found for this signature in database

View file

@ -62,5 +62,9 @@ jobs:
git config user.email "ci@git.mcintire.me"
git config user.name "CI"
git add k8s/deployment.yaml
git diff --cached --quiet || git commit -m "chore: update towerops-web image to ${{ steps.meta.outputs.tag }} [skip ci]"
git push origin HEAD:main
if ! git diff --cached --quiet; then
git commit -m "chore: update towerops-web image to ${{ steps.meta.outputs.tag }} [skip ci]"
# Pull with rebase to handle concurrent pushes
git pull --rebase origin main
git push origin HEAD:main
fi