Skip to content

Commit 8b2d872

Browse files
authored
Update GitHub Actions to Node.js 24-compatible versions (#3828)
GitHub is deprecating Node.js 20 for GitHub Actions. Actions will be forced to run on Node.js 24 starting June 2, 2026, and Node.js 20 will be removed from runners on September 16, 2026. Example [warning](https://github.com/pytorch/tutorials/actions/runs/24339682714/job/71109101345?pr=3826): ``` Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v3, nick-fields/retry@3e91a01, pytorch/test-infra/.github/actions/setup-ssh@main. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026. Node.js 20 will be removed from the runner on September 16th, 2026. Please check if updated versions of these actions are available that support Node.js 24. To opt into Node.js 24 now, set the FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true environment variable on the runner or in your workflow file. Once Node.js 24 becomes the default, you can temporarily opt out by setting ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/ ``` This PR updates all actions in this repo to versions that support Node.js 22+: - actions/checkout: v2/v3/v4 → v6 - actions/setup-python: v2/v4 → v5 - actions/github-script: v6 → v7
1 parent 62d4b7a commit 8b2d872

8 files changed

Lines changed: 14 additions & 14 deletions

File tree

.github/workflows/MonthlyLinkCheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
issues: write
1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
with:
2020
fetch-depth: 1
2121
- name: Check Links

.github/workflows/_build-tutorials-base.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
docker exec -it $(docker container ps --format '{{.ID}}') bash
5353
5454
- name: Checkout Tutorials
55-
uses: actions/checkout@v3
55+
uses: actions/checkout@v6
5656
with:
5757
fetch-depth: 0
5858

@@ -130,7 +130,7 @@ jobs:
130130
docker exec -it $(docker container ps --format '{{.ID}}') bash
131131
132132
- name: Checkout Tutorials
133-
uses: actions/checkout@v3
133+
uses: actions/checkout@v6
134134
with:
135135
fetch-depth: 0
136136

.github/workflows/check-redirects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 0
1818

.github/workflows/docathon-label-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
pull-requests: write
1313
steps:
1414
- name: Check if PR mentions an issue and get labels
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 1
1818
- name: Set up Python
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: 3.x
2222
- name: Install dependencies

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
github-secret: ${{ secrets.GITHUB_TOKEN }}
3939

4040
- name: Checkout
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v6
4242

4343
- name: Setup Linux
4444
uses: pytorch/test-infra/.github/actions/setup-linux@main

.github/workflows/link_checkPR.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 1
1818

@@ -22,7 +22,7 @@ jobs:
2222

2323
- name: Check for Skip Label
2424
id: skip-label
25-
uses: actions/github-script@v6
25+
uses: actions/github-script@v7
2626
with:
2727
script: |
2828
const labels = await github.rest.issues.listLabelsOnIssue({

.github/workflows/lintrunner.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout tutorials
19-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
uses: actions/checkout@v6
2020

2121
- name: Setup Python
22-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
22+
uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.12'
2525

.github/workflows/spelling.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: Check for skip label and get changed files
1414
id: check-files
15-
uses: actions/github-script@v6
15+
uses: actions/github-script@v7
1616
with:
1717
script: |
1818
let skipCheck = false;
@@ -48,7 +48,7 @@ jobs:
4848
core.setOutput('files', changedFiles.join('\n'));
4949
core.setOutput('is-pr', (context.eventName === 'pull_request').toString());
5050
51-
- uses: actions/checkout@v4
51+
- uses: actions/checkout@v6
5252
if: steps.check-files.outputs.skip != 'true'
5353
with:
5454
fetch-depth: 0
@@ -83,7 +83,7 @@ jobs:
8383
echo "$FILES"
8484
fi
8585
86-
- uses: actions/setup-python@v4
86+
- uses: actions/setup-python@v5
8787
if: |
8888
steps.check-files.outputs.skip != 'true' &&
8989
steps.check.outputs.skip != 'true'

0 commit comments

Comments
 (0)