Skip to content

Update actions to use versions that use Node v24#3451

Open
kevinb-khan wants to merge 6 commits intomainfrom
fei-7601
Open

Update actions to use versions that use Node v24#3451
kevinb-khan wants to merge 6 commits intomainfrom
fei-7601

Conversation

@kevinb-khan
Copy link
Copy Markdown
Collaborator

@kevinb-khan kevinb-khan commented Apr 2, 2026

Summary:

GitHub Actions will no longer be supporting the use of Node v20 in workflow and actions on April 24. That means we need to make sure all workflows and actions are using Node v24 before then.

This PR also includes a script which we use in some of our other repos to keep the SHAs for actions up to date. It updated the SHA based on the version in the comment that comes after it.

Issue: FEI-7601

Test plan:

  • let CI run all jobs and verify that there are no Node v20 warnings
Screenshot 2026-04-02 at 3 03 07 PM

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🗄️ Schema Change: No Changes ✅

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Size Change: 0 B

Total Size: 495 kB

ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.5 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 6.21 kB
packages/math-input/dist/es/index.js 98.5 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.item-splitting.js 11.9 kB
packages/perseus-core/dist/es/index.js 25.1 kB
packages/perseus-editor/dist/es/index.js 102 kB
packages/perseus-linter/dist/es/index.js 9.3 kB
packages/perseus-score/dist/es/index.js 9.66 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/index.js 193 kB
packages/perseus/dist/es/strings.js 8.09 kB
packages/pure-markdown/dist/es/index.js 1.39 kB
packages/simple-markdown/dist/es/index.js 6.71 kB

compressed-size-action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

🛠️ Item Splitting: No Changes ✅

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

npm Snapshot: NOT Published

Oh noes!! We couldn't find any changesets in this PR (6f1561b). As a result, we did not
publish an npm snapshot for you.

@kevinb-khan kevinb-khan marked this pull request as ready for review April 2, 2026 19:03
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@kevinb-khan kevinb-khan requested a review from a team April 2, 2026 19:06
Copy link
Copy Markdown
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual workflow changes are great.

With regards to the script, I have several comments and one more, in general. Will this be something we want to bake in to wonder-stuff as a pnpm dlx-able tool like we did for wonder-stuff-tool-new-pkg?

Comment on lines +2 to +5
* Scan all workflow and action YAML files for GitHub Action references and
* ensure they are pinned to commit SHAs. Handles two cases:
* 1. Already pinned (`uses: owner/repo@<sha> # <tag>`) — updates stale SHAs
* 2. Unpinned (`uses: owner/repo@<tag>`) — replaces with `@<sha> # <tag>`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you say "stale", does this mean "not latest" or something else? ie. Is this an upgrade script or just one that transforms our workflow yaml file to all have SHA-pinned actions references?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit that a tag points to can change over time. If the SHA isn't current then it updates the SHA to point to whatever the corresponding tag currently points to.

.sort();
console.log("Allowed actions:\n");
for (const repo of uniqueRepos) {
console.log(`${repo}@*,`);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, since the workflow yml files reference actions as repo/name, would we be more clear with this listing if we used:

console.log(`${repo}/*`);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense as is because usually the actions appear in workflows like so:

uses: Repo/name@vN

Copy link
Copy Markdown
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super! Thanks for breaking the pieces into separate functions! That's super helpful.

let m: RegExpExecArray | null;

// Collect already-pinned refs
// Groups: action(1), sha(2), quote(3), ref(4)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cases like this, I often use named groups to make the code a bit more resilient to changes in the groups the regex has.

Eg.

const PINNED_RE =
    /(?<=^[^#\n]*uses:\s+"?)(?<action>[^@\s"]+)@(?<ref>[a-f0-9]{40})("?)[^\S\n]+#[^\S\n]*(\S+)/gm;

const m = PINNED_RE.exec(content); 
if (m != null) {
  const {action, ref} = m.groups;
  ...
}

No action required.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Thanks for converting to .ts. Can you also chmod +x utils/update-pinned-actions.ts so we can run this as $ ./utils/update-pinned-actions.ts, please?

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.

2 participants