ci: set cache-mode on release workflows - #263
Draft
claude[bot] wants to merge 1 commit into
Draft
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by David Sanders · Slack thread
Before: A push to
mainruns the Release workflow, which first callstest.yml(whosesetup-nodesteps usecache: 'yarn', so they restore and save the Actions cache) and then runs thereleasejob. Only the release job's ownsetup-nodestep opts out of caching viapackage-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: noneat the top level, so every job in a release run is denied Actions cache access regardless of per-step settings. Because thetestjobuses:test.yml, the caller'snonealso applies to those called test jobs during release runs, so theircache: 'yarn'restore/save steps will log that the cache is unavailable and continue (a cache miss, then a no-op save). PR CI runs oftest.ymlare unchanged and keep caching.GitHub's new workflow- and job-level
cache-modekey 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-levelpermissionsblock in.github/workflows/release.yml. The existingpackage-manager-cache: falseline 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
actionlintv1.7.12 flagscache-modeas an unexpected workflow key because its schema predates the feature; this repo does not run actionlint in CI, andzizmorv1.30.1 accepts the file.🤖 Generated with Claude Code
https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Generated by Claude Code