| 1. What Causes the Error? | 2. Step-by-Step Solution |
| 3. Best Practices | 4. Frequently Asked Questions |
⚠️ GitHub Actions reports this warning when a workflow uses an action built for the deprecated Node.js 20 runtime. Update the affected action to a Node.js 24-compatible release, such as newer major versions of official actions. As of September 23, 2026, GitHub has removed Node.js 20 from its runners, so upgrading the action is the permanent fix.
The warning is caused by the runtime used internally by a GitHub Action, not necessarily the Node.js version used by your application.
A typical warning looks like:
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: <action-name>@<version>
The important part is the action named in the warning. That is the component you need to investigate.
Open the failed or warning-producing workflow and inspect the action named in the GitHub Actions message. For example:
steps: - uses: actions/checkout@v4 - uses: some-org/example-action@v2 - run: npm test
Do not assume that your application itself must immediately migrate from Node.js 20. The warning concerns the Action's internal execution runtime. Your workflow can separately install and run a particular Node.js version for your project.
Look at the affected action's releases or documentation and identify its Node.js 24-compatible version. For official GitHub Actions, newer major releases have already moved to Node.js 24. For example, actions/checkout v5 moved the action to Node.js 24, while current actions/setup-node releases support Node.js 24.
❌ The Problematic Code
A workflow might contain an older action release:
name: Node.js CI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test
The important distinction is that the node-version: 20 line and the action's internal Node runtime are two different things. Updating only node-version: 20 does not necessarily remove a "Node.js 20 actions are deprecated" warning.
✅ The Fixed Code
For current official GitHub Actions, use Node.js 24-compatible action releases:
name: Node.js CI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 24
- run: npm ci
- run: npm test
Current actions/setup-node documentation demonstrates actions/checkout@v7 and actions/setup-node@v7 with Node.js 24. Current setup-node source also specifies Node.js 24 or newer for its own runtime.
The critical changes are:
- uses: actions/checkout@v4 + uses: actions/checkout@v7 - uses: actions/setup-node@v4 + uses: actions/setup-node@v7 - node-version: 20 + node-version: 24
However, do not blindly change every node-version: 20 to 24. If your application officially supports Node.js 20 and you need to keep testing it, you can still configure the project to test Node.js 20 separately. The GitHub Action itself must be compatible with the runner's supported Action runtime.
For example:
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 20
- run: npm ci
- run: npm test
Here, setup-node can run using its supported Action runtime while installing Node.js 20 for your application tests. GitHub's documentation distinguishes the Action runtime from the Node.js version installed for the workflow.
The warning may come from a third-party action rather than actions/checkout or actions/setup-node. For example:
steps: - uses: actions/checkout@v7 - uses: vendor/custom-action@v2
If GitHub identifies vendor/custom-action@v2 as the Node.js 20 action, changing checkout will not solve the warning. Instead:
uses: reference.A real GitHub issue illustrates this situation: actions/add-to-project@v1.0.2 generated the Node.js 20 warning because that action was still running on Node.js 20.
The problematic action may not appear directly in your main workflow. Check:
.github/workflows/ .github/actions/
Also inspect:
uses: ./.github/actions/my-action
and reusable workflows such as:
uses: organization/repository/.github/workflows/build.yml@main
A nested action can be responsible for the Node.js 20 warning even when the top-level workflow looks current.
Before Node.js 20 removal, GitHub provided a temporary opt-in mechanism for testing Node.js 24:
env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GitHub also documented ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true as a temporary way to continue using Node.js 20 during the migration period. As of September 23, 2026, Node.js 20 has been removed from GitHub-hosted runners according to GitHub's current deprecation schedule. Therefore, a runtime override should not be treated as the permanent solution.
A: Not necessarily. The warning usually identifies a GitHub Action whose internal runtime uses Node.js 20. Your application's Node.js version and the Action's runtime are separate concerns.
A: Not always. If your application still requires Node.js 20, you can use a Node.js 24-compatible GitHub Action to install and test Node.js 20. Change node-version only when your application's supported Node.js version should also change.
A: Update the specific action named in the warning to a release that supports Node.js 24. GitHub explicitly recommends that Actions users update workflows to newer action versions that run on Node.js 24.
A: setup-node controls the Node.js version installed for your workflow. The warning can come from another action's internal runtime. You must update the action actually identified in the warning.
A: Yes, depending on your application's requirements and the tooling you use. GitHub's Node.js 20 Action deprecation concerns the runtime used by GitHub Actions themselves. It does not automatically mean your application code cannot test against Node.js 20.
A: If your workflow uses an older checkout release, upgrading is appropriate when that release does not support the runner's required runtime. Current actions/checkout releases include Node.js 24 support, with v5 having moved the action to Node.js 24.
A: Yes. Current actions/setup-node releases support Node.js 24, and the current documentation uses actions/setup-node@v7 with node-version: '24'.
A: Check the action's repository for a maintained release or migration guidance. If no compatible release exists, replace the action with a maintained alternative or update the action yourself if you own the repository.
A: GitHub phased the migration rather than removing Node.js 20 immediately. The runner first supported Node.js 24 and provided migration options, then Node.js 24 became the default, followed by the scheduled removal of Node.js 20. The current GitHub schedule lists September 23, 2026 for Node.js 20 removal.
A: Check every uses: entry, including third-party actions, local actions, reusable workflows, and nested workflows. The warning normally identifies the specific action still executing on Node.js 20.