You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The stale-promotion guard skipped any run whose commit was no longer the
branch head. If commit A passed its gate but was superseded mid-run by
commit B, and B then failed tests, A's promotion was skipped and the
deploy tags stayed on pre-A code with no automatic recovery (Cursor
finding on #5712).
A first-attempt run promoting an ancestor of the branch head is always a
forward deploy — runs on a ref are serialized by the concurrency group,
so nothing newer can have promoted first. Only re-runs of superseded
commits (a rollback attempt) and force-pushed-away commits are skipped.
Same semantics applied to the GHCR latest-tag guard.
echo "::warning::Skipping promotion of ${{ github.sha }}: ${GITHUB_REF_NAME} has moved to ${HEAD_SHA}. Moving the deploy tags to this commit would deploy stale code; push a revert commit to roll back instead."
315
+
if [ "$HEAD_SHA" = "${{ github.sha }}" ]; then
316
+
echo "fresh=true" >> $GITHUB_OUTPUT
317
+
exit 0
318
+
fi
319
+
if [ "${{ github.run_attempt }}" != "1" ]; then
320
+
echo "::warning::Skipping promotion of ${{ github.sha }} (re-run): ${GITHUB_REF_NAME} has moved to ${HEAD_SHA}. Moving the deploy tags back would deploy stale code; push a revert commit to roll back instead."
echo "::warning::${GITHUB_REF_NAME} has moved to ${HEAD_SHA}; publishing immutable tags for ${{ github.sha }} but skipping the latest tags."
450
+
if [ "$HEAD_SHA" = "${{ github.sha }}" ]; then
451
+
echo "fresh=true" >> $GITHUB_OUTPUT
452
+
exit 0
453
+
fi
454
+
if [ "${{ github.run_attempt }}" != "1" ]; then
455
+
echo "::warning::${GITHUB_REF_NAME} has moved to ${HEAD_SHA} and this is a re-run; publishing immutable tags for ${{ github.sha }} but skipping the latest tags."
echo "::notice::${GITHUB_REF_NAME} has moved to ${HEAD_SHA}, but ${{ github.sha }} is its ancestor — publishing latest tags forward."
433
462
echo "fresh=true" >> $GITHUB_OUTPUT
463
+
else
464
+
echo "::warning::${GITHUB_REF_NAME} has moved to ${HEAD_SHA} (compare status: ${STATUS}); publishing immutable tags for ${{ github.sha }} but skipping the latest tags."
0 commit comments