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:
parent
65b41f82fe
commit
f1b61513d6
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue