-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Upgrade GitHub Actions for Node 24 compatibility #2124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,12 +15,12 @@ jobs: | |
| if: ${{ github.event_name == 'issue_comment' && contains(github.event.comment.body, '/release-rc') && startsWith(github.event.issue.title, 'Release') }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: main | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v4 | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
|
Comment on lines
17
to
24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: actions/checkout v6: release notes / breaking changes (summary)
Official “What’s Changed” (v6.0.0)
Citations:
🌐 Web query:
💡 Result: actions/setup-go v6.0.0 (released Sep 4) breaking changes:
Sources: GitHub v6.0.0 release notes [1] and repository “Breaking changes in V6” section [2]. Verify actions/checkout@v6 and actions/setup-go@v6 for compatibility with this workflow. Both actions have breaking changes in v6:
Both require GitHub Actions Runner v2.329.0+ (checkout) and v2.327.1+ (setup-go). Confirm your environment meets these minimum versions. 🤖 Prompt for AI Agents |
||
| go-version: "1.23.0" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,15 +25,15 @@ jobs: | |
| if: ${{ github.event.label.name == 'ci/ui' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: actions/checkout@v6 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v2 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '18' | ||
| - name: Get yarn cache directory path | ||
| id: yarn-cache-dir-path | ||
| run: echo "::set-output name=dir::$(yarn cache dir)" | ||
| - uses: actions/cache@v2 | ||
| - uses: actions/cache@v5 | ||
|
Comment on lines
+28
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: actions/checkout v6 — release notes & breaking changesRelease notes (v6.0.0):
What changed (the “breaking-change-ish” parts):
Who might actually be impacted:
Sources: GitHub release v6.0.0 notes [1], official README/Marketplace “Checkout v6” notes [2], and the implementing PR description (details on References Citations:
🌐 Web query:
💡 Result: actions/setup-node v6 — breaking changes (from release notes)
Sources: GitHub Releases for v6.0.0 and v6.1.0, plus the Marketplace “Breaking changes in V6” section. [1][2][3] 🌐 Web query:
💡 Result: actions/cache@v5 — breaking/required changes (release notes)
Source: actions/cache “What’s New” / important changes section. [1] References[1] actions/cache repository (README / What’s New): https://github.com/actions/cache 🌐 Web query:
💡 Result:
In a workflow (Bash)- name: Produce output
id: my_step
run: echo "my_output=some value" >> "$GITHUB_OUTPUT"
- name: Consume output
run: echo "${{ steps.my_step.outputs.my_output }}"[1][2] PowerShell- id: my_step
run: '"my_output=some value" >> $env:GITHUB_OUTPUT'[2] Multiline output{
echo "my_output<<EOF"
echo "line 1"
echo "line 2"
echo "EOF"
} >> "$GITHUB_OUTPUT"[2] If you author JavaScript/TypeScript actionsUpdate Replace deprecated set-output with GITHUB_OUTPUT. The action versions (checkout@v6, setup-node@v6, cache@v5) are compatible with your workflow configuration. Note that setup-node@v6 disabled automatic Yarn caching; your manual However, line 35 uses the deprecated run: echo "::set-output name=dir::$(yarn cache dir)"Replace it with: run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT"🧰 Tools🪛 actionlint (1.7.10)[error] 35-35: workflow command "set-output" was deprecated. use (deprecated-commands) 🤖 Prompt for AI Agents
Comment on lines
33
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result:
Replace
|
||
| id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
| with: | ||
| path: | # should cache node_modules as well | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,15 +24,15 @@ jobs: | |
| if: ${{ github.event.label.name == 'ci/ui'}} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@v6 | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v2 | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '18' | ||
| - name: Get yarn cache directory path | ||
| id: yarn-cache-dir-path | ||
| run: echo "::set-output name=dir::$(yarn cache dir)" | ||
| - uses: actions/cache@v2 | ||
| - uses: actions/cache@v5 | ||
|
Comment on lines
+27
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: To replace the deprecated workflow command: echo "::set-output name=MY_OUTPUT::$value"write to the step’s environment file instead: echo "MY_OUTPUT=$value" >> "$GITHUB_OUTPUT"Then consume it the same way: ${{ steps.<id>.outputs.MY_OUTPUT }}For multiline outputs, use the delimiter (“heredoc-style”) format: {
echo 'MY_OUTPUT<<EOF'
printf '%s\n' "$value"
echo 'EOF'
} >> "$GITHUB_OUTPUT"GitHub announced the deprecation of Sources: 🏁 Script executed: cat -n .github/workflows/ui-test.yaml | sed -n '25,37p'Repository: Canner/WrenAI Length of output: 617 Replace deprecated
♻️ Proposed fix- run: echo "::set-output name=dir::$(yarn cache dir)"
+ run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT🧰 Tools🪛 actionlint (1.7.10)[error] 34-34: workflow command "set-output" was deprecated. use (deprecated-commands) 🤖 Prompt for AI Agents |
||
| id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
| with: | ||
| path: | # should cache node_modules as well | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Canner/WrenAI
Length of output: 2422
🌐 Web query:
actions/checkout v6 release notes breaking changes migration💡 Result:
actions/checkout v6 — release notes (what changed)
persist-credentials: true(default), checkout no longer writes credentials into.git/config. Instead, it stores them in a separate file under$RUNNER_TEMPand wires Git up so normalgit fetch/pushstill work. (github.com)gitcommands you run on the runner (includinggit push) should continue working without modifications. (github.com)Breaking changes / who might be impacted
You’re most likely to be impacted if your workflow (or a third-party action/script) directly inspects or depends on credentials being present in
.git/config(for example, parsing.git/configto retrieve the token/credential helper config). In v6, that assumption no longer holds because credentials are persisted via the$RUNNER_TEMPmechanism instead. (github.com)Migration checklist (v5 → v6)
uses: actions/checkout@v5→uses: actions/checkout@v6. (github.com)gitauth operations inside the container, ensure your runner is v2.329.0+. (github.com).git/configcontaining auth, and refactor to rely on normalgitbehavior (or explicitly pass credentials another way). (github.com)Citations:
🌐 Web query:
actions/upload-artifact v6 release notes breaking changes migration💡 Result:
actions/upload-artifact v6 — release notes / breaking changes
What changed in v6 (v6.0.0)
runs.using: node24).@v6).These are the key (and effectively breaking) changes called out for v6. [1][2]
Migration guidance
If you’re on GitHub-hosted runners
uses: actions/upload-artifact@v6No other workflow changes are called out specifically for v6 beyond the Node 24 runtime shift. [1][2]
If you’re on self-hosted runners (most common break)
uses: actions/upload-artifact@v6Otherwise, v6 may fail to start due to the Node 24 runtime requirement. [1][2]
If you’re migrating from v3 (or earlier) → v6
Most “real” breaking behavior changes happened at v4 (and still apply in v6), notably:
overwrite). [2]Deprecation context (why you’re likely migrating)
GitHub deprecated v3 on Jan 30, 2025, so moving to v4+ (and thus v6) is required on GitHub.com. [3]
Sources: GitHub Releases for
actions/upload-artifactv6.0.0 [1], repository README “v6 – What’s new” and v4 breaking changes [2], GitHub Changelog deprecation notice for v3 [3].🌐 Web query:
actions/download-artifact v7 release notes breaking changes migration💡 Result:
actions/download-artifact@v7 (v7.0.0) — release notes / breaking changes
Breaking change
actions/download-artifact@v7now runs on Node.js 24 (runs.using: node24). This also introduces a minimum GitHub Actions Runner version of 2.327.1 (relevant for self-hosted runners). Previously, v6 defaulted to Node.js 20. [1][2][3]Migration checklist (from v6 → v7)
uses: actions/download-artifact@v6→uses: actions/download-artifact@v7[1]What changed (high level)
Ensure self-hosted runners are at version 2.327.1 or later before deploying.
actions/checkout@v6is safe for this workflow—it only impacts code that directly inspects.git/configfor credentials, which doesn't apply here.However, both
actions/upload-artifact@v6andactions/download-artifact@v7require GitHub Actions Runner ≥ 2.327.1 due to Node.js 24 runtime. Since this workflow uses custom self-hosted runners (linux_amd64_runner,linux_arm64_runner), verify those runners have been upgraded to the minimum version before this change lands in production.Also applies to: 63-75
🤖 Prompt for AI Agents