Skip to content

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

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

ci: set cache-mode on release workflows#263
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: A push to main runs the Release workflow, which first calls test.yml (whose setup-node steps use cache: 'yarn', so they restore and save the Actions cache) and then runs the release job. Only the release job's own setup-node step opts out of caching via package-manager-cache: false; nothing stops any other step, action, or the called test jobs from reading or writing the cache during a release run.

After: The Release workflow declares cache-mode: none at the top level, so every job in a release run is denied Actions cache access regardless of per-step settings. Because the test job uses: test.yml, the caller's none also applies to those called test jobs during release runs, so their cache: 'yarn' restore/save steps will log that the cache is unavailable and continue (a cache miss, then a no-op save). PR CI runs of test.yml are unchanged and keep caching.

GitHub's new workflow- and job-level cache-mode key lets a workflow enforce that release paths never touch the Actions cache (changelog, syntax reference).

How: Adds cache-mode: none (with a one-line comment) after the top-level permissions block in .github/workflows/release.yml. The existing package-manager-cache: false line is left in place. No other workflows are touched.

Note that PR CI does not exercise the release workflow, so the first release after merge is the real test. A denied cache step logs a message and continues rather than failing the job. Local actionlint v1.7.12 flags cache-mode as an unexpected workflow key because its schema predates the feature; this repo does not run actionlint in CI, and zizmor v1.30.1 accepts the file.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd


Generated by Claude Code

Add top-level `cache-mode: none` to release.yml so the release run (and
the test.yml jobs it calls) never reads from or writes to the Actions
cache, regardless of per-step cache settings.

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