Skip to content

Commit 9deffd2

Browse files
authored
chore: bump actions to node24 runtime (#36)
Every run of these reusable workflows now emits: > Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@v4, actions/setup-node@v4. See the [runner changelog](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/). Bumps: - `actions/checkout` v4 -> v7 - `actions/setup-node` v4 -> v7 - `actions/github-script` v7 -> v9 - `codecov/codecov-action` v3 -> v7 (v3 still targets node16) `github-script` is only used for a pure-JS architecture calculation with no octokit calls, so the v8 Octokit change does not apply. `codecov-action` is only passed `token`, which v7 still accepts. One behaviour guard: setup-node v5 started enabling npm caching automatically when `package.json` has a `packageManager` field, and v6 narrowed that to npm. These workflows install with `npm i --no-package-lock`, so auto-caching would fail on repos with no lockfile. Every `setup-node` step now passes `package-manager-cache: false` to keep the v4 behaviour. Caveat for downstream: checkout v7 refuses to check out fork PR code when the *caller* workflow is triggered by `pull_request_target` or `workflow_run`, unless it sets `allow-unsafe-pr-checkout: true` ([actions/checkout#2454](actions/checkout#2454)). Repos calling these workflows from a plain `pull_request` trigger are unaffected. Found while clearing the same warning on [cnpm/cnpmcore](https://github.com/cnpm/cnpmcore/actions/runs/31931686405), which consumes `npm-release.yml` through the `cnpm/github-actions` fork.
1 parent c0c86f6 commit 9deffd2

6 files changed

Lines changed: 40 additions & 27 deletions

File tree

.github/workflows/node-release-no-provenance.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,24 @@ jobs:
4848
steps:
4949
# Checkout action repository
5050
- name: Checkout action repository
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@v7
5252
with:
5353
repository: node-modules/github-actions
5454
path: action_repo
5555
ref: ${{ inputs.action_ref }}
5656

5757
# Checkout project repository
5858
- name: Checkout project repository
59-
uses: actions/checkout@v4
59+
uses: actions/checkout@v7
6060
with:
6161
path: main_repo
6262
token: ${{ secrets.GIT_TOKEN }}
6363

6464
# Setup Node.js environment
6565
- name: Setup Node.js
66-
uses: actions/setup-node@v4
66+
uses: actions/setup-node@v7
67+
with:
68+
package-manager-cache: false
6769

6870
# Install action dependencies
6971
- name: Install action dependencies

.github/workflows/node-release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,25 @@ jobs:
4949
steps:
5050
# Checkout action repository
5151
- name: Checkout action repository
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@v7
5353
with:
5454
repository: node-modules/github-actions
5555
path: action_repo
5656
ref: ${{ inputs.action_ref }}
5757

5858
# Checkout project repository
5959
- name: Checkout project repository
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@v7
6161
with:
6262
path: main_repo
6363
token: ${{ secrets.GIT_TOKEN }}
6464

6565
# Setup Node.js environment
6666
- name: Setup Node.js
67-
uses: actions/setup-node@v4
67+
uses: actions/setup-node@v7
6868
with:
6969
node-version: lts/*
70+
package-manager-cache: false
7071

7172
# Install action dependencies
7273
- name: Install action dependencies

.github/workflows/node-test-mysql.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ jobs:
4949
steps:
5050
# Checkout action repository
5151
- name: Checkout
52-
uses: actions/checkout@v4
52+
uses: actions/checkout@v7
5353
with:
5454
repository: node-modules/github-actions
5555
path: action_repo
5656
ref: ${{ inputs.action_ref }}
5757

5858
# Setup Node.js environment
5959
- name: Setup Node.js
60-
uses: actions/setup-node@v4
60+
uses: actions/setup-node@v7
61+
with:
62+
package-manager-cache: false
6163

6264
# Install dependencies
6365
- name: Install dependencies
@@ -108,10 +110,10 @@ jobs:
108110

109111
steps:
110112
- name: Checkout Git Source
111-
uses: actions/checkout@v4
113+
uses: actions/checkout@v7
112114

113115
- name: Calculate Architecture
114-
uses: actions/github-script@v7
116+
uses: actions/github-script@v9
115117
id: calculate_architecture
116118
with:
117119
result-encoding: string
@@ -126,11 +128,12 @@ jobs:
126128
}
127129
128130
- name: Use Node.js ${{ matrix.version }}
129-
uses: actions/setup-node@v4
131+
uses: actions/setup-node@v7
130132
with:
131133
node-version: ${{ matrix.version }}
132134
architecture: ${{ steps.calculate_architecture.outputs.result }}
133135
check-latest: true
136+
package-manager-cache: false
134137

135138
- name: Install Dependencies
136139
run: ${{ inputs.install }}
@@ -142,6 +145,6 @@ jobs:
142145
run: ${{ inputs.test }}
143146

144147
- name: Code Coverage
145-
uses: codecov/codecov-action@v3
148+
uses: codecov/codecov-action@v7
146149
with:
147150
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/node-test-parallel.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ jobs:
5050
steps:
5151
# Checkout action repository
5252
- name: Checkout
53-
uses: actions/checkout@v4
53+
uses: actions/checkout@v7
5454
with:
5555
repository: node-modules/github-actions
5656
path: action_repo
5757
ref: ${{ inputs.action_ref }}
5858

5959
# Setup Node.js environment
6060
- name: Setup Node.js
61-
uses: actions/setup-node@v4
61+
uses: actions/setup-node@v7
62+
with:
63+
package-manager-cache: false
6264

6365
# Install dependencies
6466
- name: Install dependencies
@@ -93,10 +95,10 @@ jobs:
9395

9496
steps:
9597
- name: Checkout Git Source
96-
uses: actions/checkout@v4
98+
uses: actions/checkout@v7
9799

98100
- name: Calculate Architecture
99-
uses: actions/github-script@v7
101+
uses: actions/github-script@v9
100102
id: calculate_architecture
101103
with:
102104
result-encoding: string
@@ -111,11 +113,12 @@ jobs:
111113
}
112114
113115
- name: Use Node.js ${{ matrix.version }}
114-
uses: actions/setup-node@v4
116+
uses: actions/setup-node@v7
115117
with:
116118
node-version: ${{ matrix.version }}
117119
architecture: ${{ steps.calculate_architecture.outputs.result }}
118120
check-latest: true
121+
package-manager-cache: false
119122

120123
- name: Install Dependencies
121124
run: ${{ inputs.install }}
@@ -136,6 +139,6 @@ jobs:
136139
CI_NODE_TOTAL: ${{ matrix.total_nodes }}
137140

138141
- name: Code Coverage
139-
uses: codecov/codecov-action@v3
142+
uses: codecov/codecov-action@v7
140143
with:
141144
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/node-test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,17 @@ jobs:
4343
steps:
4444
# Checkout action repository
4545
- name: Checkout
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v7
4747
with:
4848
repository: node-modules/github-actions
4949
path: action_repo
5050
ref: ${{ inputs.action_ref }}
5151

5252
# Setup Node.js environment
5353
- name: Setup Node.js
54-
uses: actions/setup-node@v4
54+
uses: actions/setup-node@v7
55+
with:
56+
package-manager-cache: false
5557

5658
# Install dependencies
5759
- name: Install dependencies
@@ -83,10 +85,10 @@ jobs:
8385

8486
steps:
8587
- name: Checkout Git Source
86-
uses: actions/checkout@v4
88+
uses: actions/checkout@v7
8789

8890
- name: Calculate Architecture
89-
uses: actions/github-script@v7
91+
uses: actions/github-script@v9
9092
id: calculate_architecture
9193
with:
9294
result-encoding: string
@@ -101,11 +103,12 @@ jobs:
101103
}
102104
103105
- name: Use Node.js ${{ matrix.version }}
104-
uses: actions/setup-node@v4
106+
uses: actions/setup-node@v7
105107
with:
106108
node-version: ${{ matrix.version }}
107109
architecture: ${{ steps.calculate_architecture.outputs.result }}
108110
check-latest: true
111+
package-manager-cache: false
109112

110113
- name: Install Dependencies
111114
run: ${{ inputs.install }}
@@ -117,6 +120,6 @@ jobs:
117120
run: ${{ inputs.test }}
118121

119122
- name: Code Coverage
120-
uses: codecov/codecov-action@v3
123+
uses: codecov/codecov-action@v7
121124
with:
122125
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/npm-release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,25 @@ jobs:
4848
steps:
4949
# Checkout action repository
5050
- name: Checkout action repository
51-
uses: actions/checkout@v4
51+
uses: actions/checkout@v7
5252
with:
5353
repository: node-modules/github-actions
5454
path: action_repo
5555
ref: ${{ inputs.action_ref }}
5656

5757
# Checkout project repository
5858
- name: Checkout project repository
59-
uses: actions/checkout@v4
59+
uses: actions/checkout@v7
6060
with:
6161
path: main_repo
6262
token: ${{ secrets.GIT_TOKEN }}
6363

6464
# Setup Node.js environment
6565
- name: Setup Node.js
66-
uses: actions/setup-node@v4
66+
uses: actions/setup-node@v7
6767
with:
6868
node-version: lts/*
69+
package-manager-cache: false
6970

7071
# Ensure npm 11.5.1 or later is installed
7172
- name: Update npm

0 commit comments

Comments
 (0)