-
-
Notifications
You must be signed in to change notification settings - Fork 642
ci: set cache-mode on release workflows #4370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
claude
wants to merge
1
commit into
7.x
Choose a base branch
from
ci/cache-mode
base: 7.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Adding
cache-mode: noneat the workflow root can make GitHub treat the whole workflow file as invalid, so maintainers get zero npm publishes/GitHub releases after merge instead of the intended cache lockdown. GitHub's Actions parser enforces a fixed schema for the workflow root (name, on, permissions, env, defaults, concurrency, jobs) and rejects unknown top-level keys with "Unexpected value ''", failing validation before any job runs;cache-modeis not a documented workflow-level key. If that happens here, every push to main after a version bump fails validation and check-release-criteria/publish never execute, silently breaking releases. The same key is added at .github/workflows/gh-pages.yml:12, so a v7.* tag push would likewise never trigger docs deploy. …Extended reasoning...
…Fix: verify
cache-modeis an actual, currently-supported top-level workflow key before merging (it is not part of the schema as of this reviewer's knowledge); if unsupported, remove it and rely on the existing package-manager-cache:false/actions/cache exclusions instead.GitHub validates each workflow YAML against a schema that only allows name, run-name, on, permissions, env, defaults, concurrency, jobs at the root; additional properties are rejected with an 'Unexpected value' validation error shown in the Actions tab, and none of the jobs run for that trigger. release.yml:10-11 and gh-pages.yml:11-12 both add
cache-mode: noneat that root level. If this key is not a real, currently-recognized field (the PR's zizmor 1.30.1 check only validates security lint rules, not GitHub's own workflow schema, so it would not catch this), the next push to main matching the release commit pattern fails workflow validation entirely: check-release-criteria and publish never run, so no npm publish and no GitHub release are created. Likewise the next v7.* tag push never runs gh-pages.yml's deploy job, so…Verification: normal. The diff inserts
cache-mode: noneat the workflow root (release.yml:11 and gh-pages.yml:11), as a sibling ofon:/permissions:/jobs:. GitHub Actions validates each workflow against a closed root schema (only name, run-name, on, permissions, env, defaults, concurrency, jobs); an unrecognized top-level property triggers a hard "Invalid workflow file … Unexpected value…