summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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