How to Fix GitHub Actions Before Node 20 Is Removed
GitHub will remove Node.js 20 from Actions runners on September 23, 2026. Learn how to find affected actions, move to Node.js 24, test workflows, and avoid last-minute failures.
On this page
GitHub Actions is already moving away from Node.js 20, and the deadline that matters for developers is September 23, 2026. After that date, GitHub plans to remove Node.js 20 from its runners, so workflows that depend on older action versions can fail or behave differently unless they are updated.
The change is easy to misunderstand because it does not mean every Node.js application in your repository must immediately move to Node.js 24. The main issue is the Node.js runtime used internally by GitHub Actions themselves. This guide shows how to find affected actions, update them safely, test the migration, and handle self-hosted runners without relying on the temporary compatibility switch.
What is changing in GitHub Actions
GitHub Actions uses Node.js to execute many JavaScript-based actions. GitHub began moving those actions from Node.js 20 to Node.js 24 after Node.js 20 reached end of life. Runners began using Node.js 24 by default on June 16, 2026, while the remaining Node.js 20 support is scheduled to disappear when GitHub upgrades its runners on September 23.
That distinction matters. A workflow can contain your own Node.js application, a build command, and several third-party actions. The application's Node.js version is controlled separately from the runtime GitHub uses to execute an action. Updating one does not automatically update the other.
First find actions that still depend on Node 20
Start with the workflow files in .github/workflows. Look for actions referenced with the uses: key, particularly older major versions of widely used JavaScript actions. The most useful first step is to inspect the action versions rather than changing the Node.js version used by your application.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm testThe node-version setting in actions/setup-node controls the Node.js installation available to your commands. It does not determine the Node.js runtime that GitHub uses internally to execute the action itself. Treat those as two separate migration tasks.
Update action versions before changing your app
The safest migration is to update affected actions to versions that support Node.js 24. GitHub's guidance for Actions users is to use the latest versions of actions that run on Node.js 24. This is generally better than forcing the runner to keep using the older runtime because action maintainers may also have fixed unrelated compatibility and security problems in newer releases.
For example, if a workflow contains an older action release, replace it with the current supported major version after checking that action's release notes and compatibility requirements.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/upload-artifact@v4Do not blindly replace every version number in a workflow. A major-version change can include behavior changes, new permissions requirements, or altered inputs. Review each action independently and run the workflow after the change.
Use Node 24 for your project when it makes sense
Node.js 24 is an Active Long-Term Support release, which makes it a sensible target for production projects that can support it. Node.js 20 is now end of life, while Node.js 22 remains a Maintenance Long-Term Support release. If your application already supports Node.js 24, you can make the runtime explicit in your workflow instead of relying on whatever version happens to be installed on a runner.
steps:
- uses: actions/checkout@v4
* uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
* run: npm ci
* run: npm test
* run: npm run buildExplicitly selecting the runtime also makes the workflow easier to reproduce. If the runner image changes later, your build still requests the Node.js version you tested rather than silently picking up a different default.
Test the workflow before the September deadline
Do not wait for Node.js 20 to disappear before discovering that an action is incompatible. Run your important workflows now and examine the logs for deprecation warnings, action failures, missing binaries, and differences in build output.
Pay particular attention to deployment, release, publishing, and scheduled workflows. A pull-request workflow that runs on every commit is likely to reveal a problem quickly, while a monthly release workflow might hide the same problem until it becomes urgent.
If your repository has several workflows, test them individually. A repository can have a perfectly healthy test workflow while a separate deployment workflow still depends on an old action.
Do not keep the Node 20 compatibility switch permanently
GitHub provides a temporary escape hatch for workflows that are not ready. Setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true allows a workflow to continue using Node.js 20 after the default runtime has moved to Node.js 24, but GitHub says this will only work until Node.js 20 is removed from the runners on September 23, 2026.
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: trueThis should be treated as migration time, not a solution. Leaving the variable in place can make a workflow appear healthy while the underlying action remains outdated. Once Node.js 20 is removed, the workaround stops helping anyway.
Check self-hosted runners separately
Self-hosted runners need additional attention because the machine, operating system, and architecture are under your control. GitHub notes that Node.js 24 is incompatible with macOS 13.4 and older versions, and self-hosted ARM32 runners will no longer be supported after the Node.js 20 deprecation.
If you operate a self-hosted runner, check its operating system and CPU architecture before the deadline. Do not assume that a workflow proven on GitHub-hosted Ubuntu or Windows runners will behave identically on an older self-hosted machine.
Watch for actions that run JavaScript internally
The most confusing failures can happen when your own project is already using a modern Node.js version but an action in the workflow is old. Your application can pass its tests locally while the workflow fails before your application even starts.
That is why the useful question is not simply βWhich Node.js version does my project use?β Ask instead, βWhich Node.js version does each GitHub Action require?β Once those two layers are separated, the migration becomes much easier to diagnose.
Make the migration explicit and repeatable
A good final workflow should explicitly select the Node.js version required by the application, use maintained action versions, and avoid relying on a runner's accidental defaults. Pinning an exact Node.js major version with actions/setup-node gives the project a predictable application runtime, while current action releases handle the runtime GitHub uses to execute those actions.
After updating the workflows, remove any temporary Node.js 20 compatibility environment variables and run the complete test, build, deployment, and release paths. If everything passes without the compatibility switch, the repository is no longer depending on the old runner runtime and is in a much better position for September 23.
Share this post



