summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-11 11:28:48 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-11 11:28:48 +0300
commit800acbfd4c7ddeb6e60be6ddf60d5d8ef433d735 (patch)
tree18e5fd802ae8370cb9de14443441b2c0e8059444 /.github
parent89a90e1880e39b1a2ebf08d265f76dd16aa193f6 (diff)
downloadvyos-documentation-800acbfd4c7ddeb6e60be6ddf60d5d8ef433d735.tar.gz
vyos-documentation-800acbfd4c7ddeb6e60be6ddf60d5d8ef433d735.zip
ci(context7): gate version-tag move + refresh on docs-only changes
Add `paths:` filter to `Update version tags` push trigger so infra-only pushes (workflows, scripts, Docker, README, etc.) skip the tag move and therefore skip the downstream Context7 refresh. Context7 only ingests `docs/**` (per context7.json `folders`), so refreshing on infra commits wasted API calls and gave no benefit. `context7.json` is also covered because changes to its `rules`/`folders`/`excludeFolders` affect what Context7 returns even when no .md files moved. The version tag's only consumer is Context7, so skipping the move on infra-only pushes is semantically correct — the tag still represents the latest docs state. `workflow_dispatch` on context7-refresh.yml remains available to force a refresh out of band. 🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/context7-refresh.yml5
-rw-r--r--.github/workflows/update-version-tags.yml12
2 files changed, 17 insertions, 0 deletions
diff --git a/.github/workflows/context7-refresh.yml b/.github/workflows/context7-refresh.yml
index b21124d8..8072c389 100644
--- a/.github/workflows/context7-refresh.yml
+++ b/.github/workflows/context7-refresh.yml
@@ -17,6 +17,11 @@ name: Context7 refresh
# BACKWARD and trigger this workflow to refresh Context7 against stale
# content. To force a Context7 refresh, use the workflow_dispatch input
# below — it calls Context7 directly without touching any tag.
+#
+# Docs-only gating is enforced upstream: `Update version tags` has a
+# `paths:` filter scoped to `docs/**` and `context7.json`, so infra-only
+# pushes (workflows, scripts, README, etc.) never fire that workflow and
+# this one never sees a workflow_run event for them.
on:
workflow_run:
diff --git a/.github/workflows/update-version-tags.yml b/.github/workflows/update-version-tags.yml
index d6b642f4..cf03c57a 100644
--- a/.github/workflows/update-version-tags.yml
+++ b/.github/workflows/update-version-tags.yml
@@ -2,6 +2,15 @@ name: Update version tags
# context7-refresh.yml triggers via workflow_run on this workflow's name.
# DO NOT rename the `name:` field above without updating context7-refresh.yml.
+#
+# The `paths` filter gates BOTH this tag-move AND the downstream Context7
+# refresh: Context7 only ingests `docs/**` (per context7.json `folders`), so
+# infra-only pushes (workflows, scripts, Docker, CODEOWNERS, README, etc.)
+# don't need a version-tag move and don't need a Context7 refresh. The tag's
+# only consumer is Context7, so skipping the move on infra-only pushes is
+# semantically correct — the tag still represents the latest docs state.
+# `context7.json` is included because changes to its `rules`, `folders`, or
+# `excludeFolders` affect what Context7 returns even when no .md files moved.
on:
push:
@@ -9,6 +18,9 @@ on:
- rolling
- circinus
- sagitta
+ paths:
+ - 'docs/**'
+ - 'context7.json'
permissions:
contents: write