From ff68a33d5200533277e16c4a287c6f248d4bfbe6 Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Sun, 10 May 2026 14:02:48 +0300 Subject: ci(version-tags): switch to github.token and singular ref endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use ${{ github.token }} for GH_TOKEN to match the convention in ai-validation.yml. - Existence check now uses the singular `git/ref/tags/$TAG` endpoint, which 404s when the tag is missing. The plural `git/refs/tags/$TAG` returns 200 with an array even when no exact match exists, which would route every run through the PATCH path and fail with 404 on any tag that has been deleted. 🤖 Generated by [robots](https://vyos.io) --- .github/workflows/update-version-tags.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-version-tags.yml b/.github/workflows/update-version-tags.yml index 450ea95e..eb87f801 100644 --- a/.github/workflows/update-version-tags.yml +++ b/.github/workflows/update-version-tags.yml @@ -20,7 +20,7 @@ jobs: steps: - name: Move version tag to pushed SHA env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} REPO: ${{ github.repository }} SHA: ${{ github.sha }} BRANCH: ${{ github.ref_name }} @@ -33,7 +33,7 @@ jobs: *) echo "Unexpected branch: $BRANCH" >&2; exit 1 ;; esac echo "Pointing tag '$TAG' at $SHA (branch $BRANCH)" - if gh api "repos/$REPO/git/refs/tags/$TAG" >/dev/null 2>&1; then + if gh api "repos/$REPO/git/ref/tags/$TAG" >/dev/null 2>&1; then gh api -X PATCH "repos/$REPO/git/refs/tags/$TAG" \ -f sha="$SHA" -F force=true else -- cgit v1.2.3