ci: set cache-mode on release workflows - #4370
Draft
claude[bot] wants to merge 1 commit into
Draft
Conversation
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
Summarize your changes:
Before: Whether a release or docs-deploy run touched the GitHub Actions cache depended on per-step configuration.
Publish (Forge 7)(push tomain) andAPI Documentation(tag pushv7.**/ dispatch, which commits to thegh-pagessite) both opt out step by step withpackage-manager-cache: falseonsetup-node, but nothing enforced that intent at the workflow level, so any future step or third-party action that restored a cache entry during a publish would silently be allowed.After: Both workflows declare
cache-mode: noneat the top level, so every job in a release or docs-deploy run is denied cache access by the runner regardless of what individual steps or actions ask for. A denied cache restore logs a message and continues as a cache miss; a denied cache save logs and becomes a no-op, so neither workflow fails because of this setting. PR CI (ci.yml) is untouched and keeps caching as before.GitHub's new workflow-level
cache-modekey makes this a declarative, enforced setting rather than a convention (see changelog and workflow syntax reference), which closes the cache-poisoning avenue on the paths that publish to npm and to js.electronforge.io.How: Adds
cache-mode: none(with a one-line comment) directly after the top-levelpermissions: {}block in.github/workflows/release.ymland.github/workflows/gh-pages.yml. No other lines changed; the existingpackage-manager-cache: falselines are kept. Both files parse as YAML and zizmor 1.30.1 accepts the new key with no new findings. Note that PR CI does not exercise these workflows, so the first version-bump release (and the resultingv7.*tag push) after merge is the real test of this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01MYe3WCXtgiqomNuVQdi4Yd
Generated by Claude Code