A re-run of an older commit (or any push landing mid-build) made the final push non-fast-forward, so the image was built but never deployed.
This commit is contained in:
1 parent
da1043e6f3
commit
93415c6852
1 file changed
+9
-1
@@ -124,4 +124,12 @@ jobs:
|
||||
git diff --cached --quiet && { echo "no image change"; exit 0; }
|
||||
git commit -m "ci: deploy ${{ steps.tag.outputs.sha }} [skip ci]"
|
||||
git remote set-url origin "http://${{ github.repository_owner }}:${{ secrets.CI_TOKEN }}@10.66.15.22:3000/bmr_bluecap/bcs-website.git"
|
||||
git push origin HEAD:main
|
||||
# main may have moved since checkout (a later push, or a re-run of an older commit).
|
||||
# Only kustomization.yaml changes here, so rebasing onto the new tip is safe.
|
||||
for attempt in 1 2 3; do
|
||||
git push origin HEAD:main && exit 0
|
||||
echo "push rejected (main moved); rebasing onto origin/main, attempt $attempt"
|
||||
git fetch --unshallow origin main 2>/dev/null || git fetch origin main
|
||||
git rebase origin/main
|
||||
done
|
||||
exit 1
|
||||
Reference in new issue
Block a user