Skip to content

ci: set cache-mode on release workflows - #205

Draft
claude[bot] wants to merge 1 commit into
mainfrom
ci/cache-mode
Draft

ci: set cache-mode on release workflows#205
claude[bot] wants to merge 1 commit into
mainfrom
ci/cache-mode

Conversation

@claude

@claude claude Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Requested by David Sanders · Slack thread

Before: The Release workflow (push to main) has no cache policy of its own. The actions/setup-node step opts out with package-manager-cache: false, but that is a per-step choice; any step, action, or reusable workflow added later could read from or write to the Actions cache during a release run, and nothing in the workflow would stop it.

After: The workflow carries a top-level cache-mode: none, so the runner denies every cache read and write for the whole run regardless of per-step settings. Because release.yml calls test.yml via uses:, the none cap also applies to those test jobs during release runs (PR runs of test.yml are unaffected and keep caching). A step that tries to use the cache logs a message and continues: a skipped restore behaves as a cache miss and a skipped save is a no-op, so the run does not fail.

GitHub added the workflow- and job-level cache-mode key to control Actions cache access (changelog, syntax reference), and release paths should never depend on cache contents.

How: Adds cache-mode: none (with a one-line comment) after the top-level permissions: block in .github/workflows/release.yml. No other lines change; the existing package-manager-cache: false setting stays in place. PR CI does not exercise this workflow, so the first release after merge is the real test. The file parses cleanly and zizmor 1.30.1 accepts the new key; actionlint 1.7.12 does not yet recognise cache-mode at the workflow level (its schema predates the feature), which is worth knowing if actionlint is ever added to CI here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd

Add the workflow-level `cache-mode: none` key so release and docs-publish
runs never read from or write to the Actions cache.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant