summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-10 14:02:48 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-10 14:02:48 +0300
commitff68a33d5200533277e16c4a287c6f248d4bfbe6 (patch)
tree15e7b07d403fd87c8dfdc35121e2ada47e754a5b /.github/workflows
parentdd444cacec2fd91c83fd4e9912af69d806750da7 (diff)
downloadvyos-documentation-ff68a33d5200533277e16c4a287c6f248d4bfbe6.tar.gz
vyos-documentation-ff68a33d5200533277e16c4a287c6f248d4bfbe6.zip
ci(version-tags): switch to github.token and singular ref endpoint
- 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)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/update-version-tags.yml4
1 files 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