fix: target node20 so GHES 3.16 runners can load the action - #41
Merged
Conversation
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.
GHES 3.16 runners reject
using: node24at job setup:The action fails before it reads any input. The GHES fix from v0.3.1 never runs there.
Changes
action.yamlnow declaresusing: node20.githubURLRegex()now uses a local escape helper.RegExp.escapeneeds Node 24 and was the only Node 24 API in the bundle.dist. Updated stale Node 24 references.Why node20 is safe
Node 20 is EOL since April 2026, but that does not break this action. Since June 16, 2026, runners run
node20actions on Node 24 automatically, and GitHub removes the Node 20 binary from runners on September 23, 2026. Per the GitHub changelog:The opt-out env var works "only until we upgrade the runner and remove Node20 on September 23rd, 2026."
The runner source confirms this applies to actions that explicitly declare
node20. HandlerFactory.cs checks "if node20 was explicitly specified in the action" and replaces the declared version with the result of NodeUtil.DetermineActionsNodeVersion, which returns node24 in phase 2 ("Node 24 is the default") unless the opt-out is set, and always returns node24 in phase 3 ("Always use Node 24 regardless of environment variables"). The same file rewritesnode12andnode16actions to node20 unconditionally, so this is the established migration path. Old GHES runners still run them on Node 20. The code avoids APIs newer than Node 20, so it works on both.Other actions do the same. actions/create-github-app-token kept v2 on
node20afternode24broke GHES (actions/create-github-app-token#274). actions/checkout@v4 and actions/github-script@v7 still declarenode20. Theirnode24versions are new majors that require runner v2.327.1+.Verification
dist/index.jscontains noRegExp.escape.RegExp.escape.After merge, cut v0.3.2 so GHES users can bump their pinned tag.
🤖 Created with Coder Agents on behalf of @bpmct