summaryrefslogtreecommitdiff
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
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)
-rw-r--r--.github/workflows/update-version-tags.yml42
-rw-r--r--context7.json4
2 files changed, 44 insertions, 2 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
diff --git a/context7.json b/context7.json
index 92eea80b..62d04b59 100644
--- a/context7.json
+++ b/context7.json
@@ -30,7 +30,7 @@
"Use reserved documentation IP space in examples: 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 (RFC 5737), 2001:db8::/32 (RFC 3849). Never use real or RFC1918 addresses."
],
"previousVersions": [
- { "branch": "circinus" },
- { "branch": "sagitta" }
+ { "tag": "1.5" },
+ { "tag": "1.4" }
]
}