summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-10 14:29:22 +0300
committerGitHub <noreply@github.com>2026-05-10 14:29:22 +0300
commit92a83f5ca95ff5400ea0151bd32ee32236107139 (patch)
tree4fd7faffae3c1ac1f276834a65a073b107b83cd4 /.github
parent4b61f4d61dc916cd076bccda6da2cd73f8e9dea2 (diff)
parenta340d0f9e4568c8ef8f06390e10f66e2eb87bd6d (diff)
downloadvyos-documentation-92a83f5ca95ff5400ea0151bd32ee32236107139.tar.gz
vyos-documentation-92a83f5ca95ff5400ea0151bd32ee32236107139.zip
Merge pull request #1934 from vyos/yuriy/version-tags-workflow
ci: floating version tags + context7 switch (rolling/1.5/1.4)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-version-tags.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/update-version-tags.yml b/.github/workflows/update-version-tags.yml
new file mode 100644
index 00000000..eb87f801
--- /dev/null
+++ b/.github/workflows/update-version-tags.yml
@@ -0,0 +1,42 @@
+name: Update version tags
+
+on:
+ push:
+ branches:
+ - current
+ - circinus
+ - sagitta
+
+permissions:
+ contents: write
+
+concurrency:
+ group: version-tag-${{ github.ref_name }}
+ cancel-in-progress: true
+
+jobs:
+ retag:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Move version tag to pushed SHA
+ env:
+ GH_TOKEN: ${{ github.token }}
+ REPO: ${{ github.repository }}
+ SHA: ${{ github.sha }}
+ BRANCH: ${{ github.ref_name }}
+ run: |
+ set -euo pipefail
+ case "$BRANCH" in
+ current) TAG=rolling ;;
+ circinus) TAG=1.5 ;;
+ sagitta) TAG=1.4 ;;
+ *) echo "Unexpected branch: $BRANCH" >&2; exit 1 ;;
+ esac
+ echo "Pointing tag '$TAG' at $SHA (branch $BRANCH)"
+ 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
+ gh api -X POST "repos/$REPO/git/refs" \
+ -f ref="refs/tags/$TAG" -f sha="$SHA"
+ fi