Skip to content

Commit 55639e1

Browse files
ralyodioclaude
andauthored
ci: move every action off the deprecated Node 20 runtime (#320)
GitHub is forcing Node 20 actions onto Node 24 and annotating every run that uses one. The publish workflow named three, but the same actions are pinned across ci, test and threatcrush-scan, and two more there — upload-artifact@v4 and github-script@v7 — are on node20 as well, along with codeql-action@v3. actions/checkout v4 -> v7 actions/setup-node v4 -> v7 pnpm/action-setup v4 -> v6 actions/upload-artifact v4 -> v7 actions/github-script v7 -> v9 codeql-action/upload-sarif v3 -> v4 Every target confirmed `runs.using: node24` before bumping, rather than assumed from the version number — codeql-action v3 is node20 and v4 is not, which the deprecation notice does not mention. Two breaking changes were checked against actual usage rather than skipped: setup-node v5 added automatic caching driven by the `packageManager` field and v6 narrowed it to npm. Every caller here passes `cache: pnpm` explicitly, so the automatic path is never consulted, and pnpm/action-setup already runs first in all three workflows — which explicit pnpm caching requires. github-script v9 makes `require('@actions/github')` fail, since that package is now ESM-only. The one script here requires `fs` and uses the injected `github` client, neither of which is affected; v9's own README still documents `require` for builtins and local modules. Not fixed here: profullstack/coinpaybot@v0 is also node20 and has no newer tag, so coinpay.yml keeps warning until that action is rebuilt in its own repo. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 9e90b4c commit 55639e1

4 files changed

Lines changed: 20 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
runs-on: ubuntu-latest
2222
timeout-minutes: 15
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v7
2525

2626
# pnpm version is read from the "packageManager" field in package.json.
2727
# Do not pin a version here — it conflicts with packageManager and fails
2828
# with ERR_PNPM_BAD_PM_VERSION.
29-
- uses: pnpm/action-setup@v4
29+
- uses: pnpm/action-setup@v6
3030

31-
- uses: actions/setup-node@v4
31+
- uses: actions/setup-node@v7
3232
with:
3333
node-version: '22'
3434
cache: pnpm

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
# Removing it changed the error from E404 to ENEEDAUTH but did not publish.
2727
# actions/setup-node#1551, npm/cli#9088.
2828
#
29+
# Since then setup-node v7 stopped exporting a dummy NODE_AUTH_TOKEN when no
30+
# token is set (actions/setup-node#1558), which is the half of that trap that
31+
# corrupted .npmrc under OIDC. It does not affect the token path — we set
32+
# NODE_AUTH_TOKEN explicitly — but it means trusted publishing is worth a third
33+
# attempt before the 2FA-bypass deprecation below forces one.
34+
#
2935
# Worth knowing when this is next revisited: npm is restricting tokens that
3036
# bypass 2FA for direct publishing, so the token path has a horizon.
3137
# https://gh.io/npm-gat-bypass2fa-deprecation
@@ -48,17 +54,17 @@ jobs:
4854
runs-on: ubuntu-latest
4955
timeout-minutes: 15
5056
steps:
51-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v7
5258

5359
# pnpm version is read from the "packageManager" field in package.json.
5460
# Do not pin a version here — it conflicts with packageManager and fails
5561
# with ERR_PNPM_BAD_PM_VERSION.
56-
- uses: pnpm/action-setup@v4
62+
- uses: pnpm/action-setup@v6
5763

5864
# `registry-url` is what makes setup-node write the .npmrc line that feeds
5965
# NODE_AUTH_TOKEN to npm. Required for token auth — and the thing to delete
6066
# first if this ever moves back to OIDC.
61-
- uses: actions/setup-node@v4
67+
- uses: actions/setup-node@v7
6268
with:
6369
node-version: 24
6470
cache: pnpm

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
runs-on: ubuntu-latest
1818
timeout-minutes: 15
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v7
2121

2222
# pnpm version is read from the "packageManager" field in package.json.
2323
# Do not pin a version here — it conflicts with packageManager and fails
2424
# with ERR_PNPM_BAD_PM_VERSION.
25-
- uses: pnpm/action-setup@v4
25+
- uses: pnpm/action-setup@v6
2626

27-
- uses: actions/setup-node@v4
27+
- uses: actions/setup-node@v7
2828
with:
2929
node-version: 22
3030
cache: pnpm

.github/workflows/threatcrush-scan.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
timeout-minutes: 15
2020

2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v7
2323

24-
- uses: actions/setup-node@v4
24+
- uses: actions/setup-node@v7
2525
with:
2626
node-version: "20"
2727

@@ -151,7 +151,7 @@ jobs:
151151
- name: Upload to the Security tab
152152
if: always() && 'true' == 'true'
153153
continue-on-error: true
154-
uses: github/codeql-action/upload-sarif@v3
154+
uses: github/codeql-action/upload-sarif@v4
155155
with:
156156
sarif_file: threatcrush.sarif
157157
category: threatcrush
@@ -236,7 +236,7 @@ jobs:
236236

237237
- name: Upload SARIF artifact
238238
if: always()
239-
uses: actions/upload-artifact@v4
239+
uses: actions/upload-artifact@v7
240240
with:
241241
name: threatcrush-sarif
242242
path: threatcrush.sarif
@@ -251,7 +251,7 @@ jobs:
251251
- name: Comment on PR
252252
if: always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
253253
continue-on-error: true
254-
uses: actions/github-script@v7
254+
uses: actions/github-script@v9
255255
with:
256256
script: |
257257
const fs = require('fs');

0 commit comments

Comments
 (0)