Node 20 Removed from GitHub Actions: Migration Guide
In this article
To migrate your GitHub Actions workflows after Node 20 is removed, update all actions/* and third-party actions to versions that run on Node 24, and ensure your custom JavaScript actions use the node24 runtime label. GitHub announced that Node 20 support in Actions will be fully removed by Spring 2025, and as of that date, workflows using Node 20-based actions will fail.
Why GitHub Is Removing Node 20
GitHub Actions uses Node.js to execute JavaScript-based actions. Each major Node version has a finite support lifecycle, and GitHub periodically upgrades the runtime to keep the platform secure and performant. Node 20 reached its end-of-life on April 30, 2026, but GitHub moved earlier to avoid security risks and to align with the broader Node.js ecosystem. The removal affects the runner's embedded Node version, which is used by actions that do not specify a custom runtime.
How to Check Which Actions Use Node 20
You can identify affected actions by examining your workflow files and the action metadata. Look for runs.using in each action's action.yml or action.yaml. If it says node20, that action will break. Common examples include older versions of actions/checkout, actions/setup-node, and actions/cache.
- Open each workflow file in your repository and list all actions used.
- Check the
runs.usingfield in each action's source (usually on GitHub). - Use GitHub's dependency graph or Dependabot to see which actions are outdated.
Step-by-Step Migration Process
- Update all official GitHub actions to their latest major versions. For example,
actions/checkout@v4uses Node 20, butactions/checkout@v5uses Node 24. Replace@v3or@v4with the newest tag. - Update third-party actions by checking their release notes. Most maintainers have already published Node 24-compatible versions.
- If you maintain custom JavaScript actions, edit your
action.ymlto changeruns.usingfromnode20tonode24. Then test locally with Node 24 to ensure compatibility. - Run your workflows and fix any errors. Pay attention to deprecation warnings in the logs.
- Enable Dependabot for GitHub Actions to automatically create pull requests for outdated actions.
What Happens If You Don't Migrate
Workflows that reference actions with node20 will fail at runtime with an error like Node.js 20 is no longer supported. The failure occurs when the runner attempts to execute the action, and the job stops immediately. If you have scheduled workflows, they will simply not run. There is no automatic fallback to an older Node version.
Common Migration Pitfalls
- Pinning to a commit SHA: If you pin an action to a specific commit, that commit may still use Node 20. Update the SHA to a newer commit that uses Node 24.
- Custom JavaScript in your workflow: If you use
actions/github-scriptor inline scripts, they run on the runner's Node version. Ensure your script is compatible with Node 24. - Third-party actions that haven't updated: Some actions may still be on Node 20. Check the repository's issues or consider forking and updating it yourself.
Comparing Node 20 vs Node 24 for Actions
Node 24 brings performance improvements, better memory management, and updated APIs. For most action code, the migration is straightforward. However, if your action uses deprecated Node 20 APIs, you may need to adjust. The Node.js official documentation provides a list of breaking changes between versions.
Costs and Impact on CI/CD
Migrating to Node 24 does not change your GitHub Actions billing. The cost is the same per minute. The only impact is the time spent updating your workflows, which is typically minimal if you use Dependabot. In the long run, staying current reduces security risks and ensures compatibility with future Actions features.
Frequently Asked Questions
Can I still use Node 20 in my own self-hosted runners?
Yes, if you use self-hosted runners, you control the Node version. However, GitHub-hosted runners will no longer have Node 20. For custom actions, you can specify a different runtime like node24 or even docker, but the default will be Node 24.
How do I know if an action uses Node 20?
Check the action's action.yml file. Look for the runs.using key. If it says node20, it's affected. You can also run a workflow and see if it fails with a Node 20 error.
What is the exact removal date?
GitHub announced that Node 20 support will be fully removed by Spring 2025. The exact date was not specified, but it is recommended to migrate as soon as possible.
Will my workflow break if I use a Docker action?
No, Docker actions run in a container and are not affected by the Node runtime change. Only JavaScript actions that use the embedded Node version are affected.
Can I use Node 22 instead of Node 24?
GitHub Actions currently supports Node 24 as the default. Node 22 is not offered as a runtime label. You must use node24 or a Docker container.
What if I see a warning but not an error?
GitHub may show deprecation warnings before the full removal. Treat these as urgent. Update the action immediately to avoid future failures.