Skip to content

Repair wp/6.6 branch Actions: Update GitHub Actions to their latest versions - #89

Closed
desrosj wants to merge 18 commits into
fix-actions-6.6/simplify-pr-label-enforcementfrom
fix-actions-6.6/update-actions-to-latest
Closed

desrosj wants to merge 18 commits into
fix-actions-6.6/simplify-pr-label-enforcementfrom
fix-actions-6.6/update-actions-to-latest

Conversation

@desrosj

@desrosj desrosj commented Aug 26, 2026 •

Copy link
Copy Markdown
Owner

What?

This updates 14 third-party GitHub Actions used across this branch's workflows (including the composite .github/setup-node/action.yml action that most of these workflows call into) to their latest published releases, and pins each to a full-length commit SHA.

Action Previous Updated
actions/checkout v4.1.6 v7.0.1
actions/setup-node v4.0.2 v7.0.0
actions/upload-artifact v4.3.3 v7.0.1
actions/upload-artifact/merge v4 (unpinned tag) v7.0.1 (pinned SHA)
actions/cache v4.0.2 v6.1.0
ramsey/composer-install v3.0.0 4.0.0
shivammathur/setup-php v2.30.4 2.37.2
preactjs/compressed-size-action v2.6.0 2.10.0
actions/download-artifact v4.1.7 v8.0.1
mheap/github-action-required-labels v5 (unpinned tag) v5.6.0 (pinned SHA)
actions/github-script v7.0.1 v9.0.0
tj-actions/changed-files v44.5.1 v47.0.6
peter-evans/find-comment v3 (unpinned tag) v4.0.0 (pinned SHA)
peter-evans/create-or-update-comment v4 (unpinned tag) v5.0.0 (pinned SHA)

Why?

The stale actions/cache pin inside .github/setup-node/action.yml was causing a Node.js runtime deprecation warning on every run: "Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24." The other actions weren't individually flagged with that same warning, but were also behind their latest available releases (or, in the case of mheap/github-action-required-labels, actions/upload-artifact/merge, peter-evans/find-comment, and peter-evans/create-or-update-comment, referenced by an unpinned tag), so this brings all of them current and consistently pinned at once rather than fixing them one at a time as each is eventually flagged. actions/github-script (used once, in .github/workflows/props-bot.yml's "Remove the props-bot label" step), tj-actions/changed-files/peter-evans/find-comment/peter-evans/create-or-update-comment (all three used only in .github/workflows/php-changes-detection.yml), and actions/upload-artifact/merge (both uses in end2end-test.yml) were found and bumped the same way during later passes. pull-request-automation.yml's own copies of the actions/checkout/actions/setup-node/actions/cache pins — missed by the original commits for those three actions — were caught in a final pass and folded into those same three commits, so this branch has no remaining stale pin of any action this PR already touches.

A zizmor ref-version-mismatch audit also caught five hash pins whose trailing # vX.Y.Z comment didn't match what the pinned commit is actually tagged upstream (preactjs/compressed-size-action, ramsey/composer-install ×2, and shivammathur/setup-php ×2, all missing/extra a v prefix or briefly drifting to a # master comment before settling on the correct stable-tag form) — corrected as comment-only fixes, no SHA changed.

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.

@desrosj
desrosj force-pushed the fix-actions-6.6/update-actions-to-latest branch from f7418b1 to 6b02fac Compare September 10, 2026 19:34
@desrosj
desrosj removed this pull request from stack #91 September 10, 2026 19:36
@desrosj
desrosj changed the base branch from fix-actions-6.6/remove-rn-workflows to fix-actions-6.6/simplify-pr-label-enforcement September 10, 2026 19:36
@desrosj
desrosj added this pull request to stack #186 September 10, 2026 19:37
@desrosj
desrosj force-pushed the fix-actions-6.6/update-actions-to-latest branch from 6b02fac to 93f0000 Compare September 10, 2026 23:50
@desrosj
desrosj force-pushed the fix-actions-6.6/update-actions-to-latest branch from 43198ae to 566354e Compare September 11, 2026 01:11
@desrosj
desrosj marked this pull request as ready for review September 11, 2026 02:50
@desrosj
desrosj marked this pull request as draft September 11, 2026 03:22
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj
desrosj force-pushed the fix-actions-6.6/update-actions-to-latest branch from ec5e2fb to 42377fd Compare September 14, 2026 01:34
@desrosj
desrosj force-pushed the fix-actions-6.6/update-actions-to-latest branch from 42377fd to 74be130 Compare September 14, 2026 19:18
Bumps `actions/checkout` from `v4.1.6` to `v7.0.1`, the latest
published release, across every workflow file that uses it.
Bumps `actions/setup-node` from `v4.0.2` to `v7.0.0`, the latest
published release, across every workflow file that uses it.
Bumps `actions/upload-artifact` from `v4.3.3` to `v7.0.1`, the latest
published release, across every workflow file that uses it.
Bumps `actions/cache` from `v4.0.2` to `v6.1.0`, the latest published
release, across every workflow file that uses it.
Bumps `ramsey/composer-install` from `v3.0.0` to `v4.0.0`, the latest
published release, across every workflow file that uses it.
Bumps `shivammathur/setup-php` from `v2.30.4` to `v2.37.2`, the latest
published release, across every workflow file that uses it.
Bumps `preactjs/compressed-size-action` from `v2.6.0` to `v2.10.0`, the
latest published release, across every workflow file that uses it.
Bumps `actions/download-artifact` from `v4.1.7` to `v8.0.1`, the latest
published release, across every workflow file that uses it.

This also pins the action to a full-length commit SHA in `.github/workflows/end2end-test.yml` where a
version reference was being used incorrectly.
The `mheap/github-action-required-labels` Action is currently referenced with `@v5`, which is not best practice.

This changes the reference to pin the action to the full-length commit SHA for the most recent release, which is currently `v5.6.0`.
Bumps `actions/github-script` from `v7.0.1` to `v9.0.0`, the latest
published release, pinning to a full-length commit SHA per this
branch's action-pinning convention.

A search of the whole `.github/` tree found only one usage, in
`.github/workflows/props-bot.yml`.
Follow-up to this layer's original `actions/checkout` bump. `publish-npm-packages.yml` didn't exist on this branch when that commit was made (it had been removed by the `remove-rn-workflows` layer and was restored afterward), so its three `actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6` calls never got updated. This brings them in line with every other workflow file in this branch, pinning to the same `v7.0.1` release already used elsewhere.
…yml`.

Follow-up to this layer's original `actions/setup-node` bump, for the same reason as the preceding `actions/checkout` follow-up: `publish-npm-packages.yml` didn't exist on this branch when that commit was made and was restored afterward, so its two `actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2` calls never got updated. This brings them in line with the rest of the stack, pinning to the same `v7.0.0` release used elsewhere.
Both uses of this sub-action in `end2end-test.yml` were unpinned (`@v4`),
tracking a mutable tag rather than a full-length commit SHA. Pin them to
the current release, `043fb46d1a93c77aae656e7c1c64a875d1fc6a0a` (`v7.0.1`),
so the workflow is not exposed to an upstream tag being moved or a
compromised release.
Move `php-changes-detection.yml`'s pin from `v44.5.1`
(`03334d095e2739fa9ac4034ec16f66d5d01e9eba`) to the current release,
`v47.0.6` (`9426d40962ed5378910ee2e21d5f8c6fcbf2dd96`), so the workflow
picks up the upstream action's fixes and security updates since the
old pin.
This use in `php-changes-detection.yml` was unpinned (`@v3`), tracking a
mutable tag rather than a full-length commit SHA. Pin it to the current
release, `b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad` (`v4.0.0`), so the
workflow is not exposed to an upstream tag being moved or a compromised
release.
All three uses in `php-changes-detection.yml` were unpinned (`@v4`),
tracking a mutable tag rather than a full-length commit SHA. Pin them to
the current release, `e8674b075228eee787fea43ef493e45ece1004c9` (`v5.0.0`),
so the workflow is not exposed to an upstream tag being moved or a
compromised release.
zizmor's `ref-version-mismatch` audit (`GITHUB_TOKEN=$(gh auth token) zizmor
--format json .github/workflows/`) found five hash pins whose trailing
`# vX.Y.Z` comment does not match what the pinned commit is actually
tagged as upstream:

- `.github/workflows/bundle-size.yml`: `preactjs/compressed-size-action`
  is tagged `2.10.0` upstream (no `v` prefix), not `v2.10.0`.
- `.github/workflows/unit-test.yml` (two occurrences): `shivammathur/setup-php`'s
  pinned commit is the tip of the `master` branch, not the `v2.37.2` tag.
- `.github/workflows/unit-test.yml` (two occurrences): `ramsey/composer-install`
  is tagged `4.0.0` upstream (no `v` prefix), not `v4.0.0`.

Correcting the comments avoids a misleading version reference next to
each pin. No SHA is changed by this commit -- only comment text.

This applies only the subset of `zizmor --fix=unsafe-only`'s output that
corresponds to these five `ref-version-mismatch` findings specifically;
unrelated "unsafe" fixes zizmor proposed from other audits (e.g.
`persist-credentials: false`, cache `lookup-only: true`, and several
broken/unrelated rewrites) were reviewed and discarded as out of scope
for this change.
The previous commit's zizmor-driven fix corrected this pin's comment to `# master`, since the pinned SHA happened to be the tip of the `master` branch at the time. But the same SHA is also tagged `2.37.2`, and `master` is a moving target — it has, in fact, already advanced past this commit since that fix was made, making the `# master` annotation stale within the same day. Using the stable version tag instead keeps the comment meaningful indefinitely and consistent with every other action pin in this repo.
@desrosj
desrosj force-pushed the fix-actions-6.6/update-actions-to-latest branch from 74be130 to 3293901 Compare September 15, 2026 00:08
@desrosj
desrosj removed this pull request from stack #186 September 15, 2026 00:25
@desrosj
desrosj added this pull request to stack #354 September 15, 2026 00:26
@desrosj
desrosj marked this pull request as ready for review September 15, 2026 00:26
@desrosj

desrosj commented Sep 15, 2026

Copy link
Copy Markdown
Owner Author

Migrated to real upstream: WordPress#82915. Closing this fork PR.

@desrosj desrosj closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant