Skip to content

Repair wp/5.9 branch Actions: Disable npm caching in release workflows - #84396

Closed
desrosj wants to merge 8 commits into
wp/5.9from
fix-actions-5.9/disable-cache-for-release-builds
Closed

desrosj wants to merge 8 commits into
wp/5.9from
fix-actions-5.9/disable-cache-for-release-builds

Conversation

@desrosj

@desrosj desrosj commented Oct 9, 2026

Copy link
Copy Markdown
Member

Part of #82934.

Part of the wp/5.9 branch Actions repair.

What?

Sets package-manager-cache: false explicitly on every actions/setup-node step in the workflows that build and publish release artifacts on this branch (1 step), and removes the build job's cache: npm.

Workflow Job Step
build-plugin-zip.yml build Use desired version of NodeJS

Why?

Cache poisoning is an attack in which a release workflow picks up build state cached by an earlier, less-trusted workflow run. A job that produces a published plugin ZIP or npm package should install from the lockfile every time.

actions/setup-node's package-manager-cache input defaults to true. It currently engages only when package.json declares packageManager (or devEngines.packageManager) naming npm — which this branch does not. That means these jobs are uncached by accident, not by intent: adding that field later would silently switch caching back on in the release path with no visible change to any workflow file. Stating it explicitly removes that dependency on unrelated packaging metadata.

How?

Ports WordPress/gutenberg#79835, "Disable caching when publishing built assets", adapted for this branch. Upstream routes these jobs through the composite .github/setup-node action and threads a new cache input through to .github/setup-npm; this branch has no setup-npm composite and its release jobs call actions/setup-node directly, so the equivalent input is set on each step instead.

The composite .github/setup-node on this branch is deliberately left alone: it is only ever called by test and automation workflows, none of which publish a release artifact.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 9, 2026
@desrosj desrosj self-assigned this Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@desrosj
desrosj added this pull request to stack #84427 October 9, 2026 16:48
@desrosj
desrosj removed this pull request from stack #84427 October 10, 2026 00:16
@desrosj
desrosj changed the base branch from fix-actions-5.9/remove-rn-workflows to wp/5.9 October 10, 2026 00:16
@desrosj

desrosj commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

Closing: build-plugin-zip.yml is now removed from wp/5.9 in #84395, so this pull request has nothing left to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant