Skip to content

Commit

Permalink
chore(ci): upgrade GitHub Actions to Node 20 (#9483)
Browse files Browse the repository at this point in the history
### Description

Upgrade all of our various actions to versions that use Node 20 since
Node 16 is getting shut down December 5

Note this does not switch us off of
[get-diff-action](https://github.com/technote-space/get-diff-action/)
which has been deprecated so we will need to find a new solution.

### Testing Instructions

CI on this PR

Test Release: 

[workflow](https://github.com/vercel/turborepo/actions/runs/11955946798)
<- failed because I wrote `actions/checkout@4` instead of
`actions/checkout@v4` on the last step
[workflow with
fix](https://github.com/vercel/turborepo/actions/runs/11956800941)

You should notice the lack of Node 16 warnings on the workflow summary
page: https://github.com/vercel/turborepo/actions/runs/11954973491
  • Loading branch information
chris-olszewski authored Nov 21, 2024
1 parent 82ae03c commit c84926f
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v3.6.0
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: pnpm
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ runs:
- name: Set Up Protoc
id: set-up-protoc
continue-on-error: true
uses: arduino/setup-protoc@v2.1.0
uses: arduino/setup-protoc@v3
with:
version: "26.x"
repo-token: ${{ inputs.github-token }}

- name: Set Up Protoc (second try)
if: steps.set-up-protoc.outcome == 'failure'
uses: arduino/setup-protoc@v2.1.0
uses: arduino/setup-protoc@v3
with:
version: "26.x"
repo-token: ${{ inputs.github-token }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/bench-turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node

- name: Setup Turborepo Environment
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
runner: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set filename for profile
id: filename
shell: bash
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
TINYBIRD_TOKEN: ${{secrets.TINYBIRD_TOKEN}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node
uses: ./.github/actions/setup-node
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
needs: [send-to-tinybird]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node
uses: ./.github/actions/setup-node
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ jobs:
options: ${{ matrix.settings.container-options }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Container
if: ${{ matrix.settings.container-setup }}
run: ${{ matrix.settings.container-setup }}

- name: Setup Protoc
uses: arduino/setup-protoc@v1.2.0
uses: arduino/setup-protoc@v3
with:
version: "26.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup capnproto
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: CI related changes
id: ci
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
echo "depth=$(( ${{ github.event.pull_request.commits || 1 }} + 1 ))" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: ${{ steps.fetch-depth.outputs.depth }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/turborepo-compare-cache-item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

steps:
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/turborepo-native-lib-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
echo "depth=$(( ${{ github.event.pull_request.commits || 1 }} + 1 ))" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: ${{ steps.fetch-depth.outputs.depth }}
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ env:
CARGO_PROFILE_RELEASE_LTO: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
RELEASE_TURBO_CLI: true # TODO: do we need this?
# Needed since we need to build on Xenial which doesn't have a new enough
# GLIBC to use Node 20.
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

on:
workflow_dispatch:
Expand All @@ -44,7 +41,7 @@ jobs:
stage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
with:
enable-corepack: false
Expand All @@ -71,7 +68,7 @@ jobs:
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ needs.stage.outputs.stage-branch }}
- name: Setup Turborepo Environment
Expand All @@ -89,7 +86,7 @@ jobs:
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ needs.stage.outputs.stage-branch }}
- name: Setup Turborepo Environment
Expand Down Expand Up @@ -135,7 +132,7 @@ jobs:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: "${{ needs.stage.outputs.stage-branch }}"

Expand All @@ -144,7 +141,7 @@ jobs:
run: ${{ matrix.settings.container-setup }}

- name: Setup Protoc
uses: arduino/setup-protoc@v2.1.0
uses: arduino/setup-protoc@v3
with:
version: "26.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -190,7 +187,7 @@ jobs:
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "${{ needs.stage.outputs.stage-branch }}"
- run: git fetch origin --tags
Expand All @@ -207,7 +204,7 @@ jobs:
git config --global user.email '[email protected]'
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: v1.18.2
Expand Down Expand Up @@ -249,7 +246,7 @@ jobs:
steps:
- name: Show Stage Commit
run: echo "${{ needs.stage.outputs.stage-branch }}"
- uses: actions/checkout@1.0.0
- uses: actions/checkout@v4
with:
ref: ${{ needs.stage.outputs.stage-branch }}
- name: Get version
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/turborepo-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: CI related changes
id: ci
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
if: matrix.os.runner == 'windows-latest'
shell: bash
run: git config --global core.autocrlf input
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
Expand All @@ -141,15 +141,15 @@ jobs:
uses: ./.github/actions/install-global-turbo

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
uses: ts-graphviz/setup-graphviz@v2
with:
macos-skip-brew-update: "true"
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: true

- name: Cache Prysk
id: cache-prysk
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: cli/.cram_env
key: prysk-venv-${{ matrix.os.runner }}
Expand All @@ -166,7 +166,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Disable corepack. actions/setup-node invokes other package managers and
# that causes corepack to throw an error, so we disable it first.
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
- "metal"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Rust
uses: ./.github/actions/setup-rust
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
- "metal"
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
if: matrix.os.name == 'windows'

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Turborepo Environment
uses: ./.github/actions/setup-turborepo-environment
Expand All @@ -300,7 +300,7 @@ jobs:
node-version: "18.20.2"

- name: Run sccache-cache
uses: mozilla-actions/[email protected].3
uses: mozilla-actions/[email protected].6

- name: Run tests
timeout-minutes: 120
Expand Down

0 comments on commit c84926f

Please sign in to comment.