Repository navigation
ci: set cache-mode on release workflows - #136
Conversation
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
There was a problem hiding this comment.
LGTM - a small, self-contained config change.
- Reviewed the identical
cache-mode: none+ explanatory comment added todocs.ymlandrelease.yml, placed right after each workflow's top-levelpermissions:block. - Confirmed no other lines changed and the existing
package-manager-cache: falsesettings onactions/setup-nodesteps remain untouched. - Could not independently verify from this offline environment whether
cache-modeis currently a recognized top-level workflow key on GitHub's schema; worst case per the PR's own description is a harmless no-op, and the maintainer who requested this change has already approved it.
Extended reasoning...
The diff only adds a two-line block (a comment plus cache-mode: none) to the top level of two workflow files, docs.yml and release.yml, with no other changes; it touches no secrets, auth, or permissions logic directly. The main open question is whether cache-mode is a real GitHub Actions schema key as of the PR's claimed 2026-09-10 changelog, which I cannot verify from this sandboxed environment (no external web access), but even if it were a no-op it would not introduce a security regression, only fail to add the intended protection. A human reviewer (dsanders11, apparently the same person who requested the change per the linked Slack thread) already approved the PR, and the automated bug-hunting system reported no findings, so I'm approving as a low-risk, mechanical config change.
Requested by David Sanders · Slack thread
Before: The
Releaseworkflow (push tomain) and thePublish documentationworkflow (push of av*tag) have no cache policy of their own. Eachactions/setup-nodestep opts out withpackage-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: Both workflows carry a top-level
cache-mode: none, so the runner denies every cache read and write for the whole run regardless of per-step settings. Becauserelease.ymlcallstest.ymlviauses:, thenonecap also applies to those test jobs during release runs (PR runs oftest.ymlare 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-modekey 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-levelpermissions:block in.github/workflows/release.ymland.github/workflows/docs.yml. No other lines change; the existingpackage-manager-cache: falsesettings stay in place. PR CI does not exercise these workflows, so the first release after merge is the real test. Both files parse cleanly and zizmor 1.30.1 accepts the new key; actionlint 1.7.12 does not yet recognisecache-modeat 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