ci: set cache-mode on release workflows - #163
Draft
claude[bot] wants to merge 1 commit into
Draft
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
Add top-level `cache-mode: none` to release.yml so the release run (and the test/build workflows it calls via `uses:`) never reads from or writes to the GitHub Actions cache. 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 callstest.ymlandbuild.ymlviauses:and then publishes to npm. The release job itself already opts out of the setup-node package-manager cache (package-manager-cache: false), but nothing prevents a step in the release run from reading or writing the GitHub Actions cache, and the called test/build jobs still usecache: "yarn"inactions/setup-node.After: The Release workflow declares
cache-mode: noneat the top level, so no job in a release run can read from or write to the Actions cache. Because the setting is on the caller, it also caps thetest.ymlandbuild.ymljobs it calls during release runs: theircache: "yarn"restore/save steps are skipped (treated as a cache miss / no-op) and they install from the registry instead. PR CI runs oftest.yml/build.ymlare unchanged and keep caching.This uses GitHub's new workflow-level
cache-modekey (changelog, syntax reference) to make release paths independent of cache contents, enforced regardless of per-step settings.How: Adds
cache-mode: none(with a one-line comment) directly after the top-levelpermissions: {}block in.github/workflows/release.yml. No other files are touched; the existingpackage-manager-cache: falseline stays.Note that PR CI does not exercise the release workflow, so the first release after merge is the real test. A cache step that is denied by
cache-modelogs a message and continues rather than failing the job.🤖 Generated with Claude Code
https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Generated by Claude Code