ci(release): retry the rolling tag push

After pushing the pin commit to main, GitHub rejected the immediate v1 tag
force-push with "missing necessary objects", so the release run failed and the
rolling tag stayed on the previous commit. Retry a few times before failing.

Co-authored-by: Bug Fixer <[email protected]>
This commit is contained in:
2026-12-03 19:06:27 +00:00
committed by GitHub
co-authored by Bug Fixer
parent c71b0ad531
commit c567ce2221
+14 -1
View File
@@ -68,5 +68,18 @@ jobs:
# commit behind, pinning the PREVIOUS image.
# "v1" must match the release job's rolling-release-tag input.
git tag -f v1 HEAD
git push -f origin refs/tags/v1
# GitHub can reject the tag push for a moment after main was
# updated ("missing necessary objects"), so retry before failing.
pushed=false
for _ in 1 2 3 4 5; do
if git push -f origin refs/tags/v1; then
pushed=true
break
fi
sleep 5
done
if [ "$pushed" != true ]; then
echo "::error::Could not move the v1 tag after 5 attempts."
exit 1
fi
fi