From c567ce22214df977c6847f6b560f43bef11819d3 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Thu, 3 Dec 2026 19:06:27 +0000 Subject: [PATCH] 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 --- .github/workflows/release.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ed091f0..c837f42 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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