From c84926fdf7c6a20e34a674c7510f0249c62480de Mon Sep 17 00:00:00 2001 From: Chris Olszewski Date: Thu, 21 Nov 2024 12:41:50 -0500 Subject: [PATCH] chore(ci): upgrade GitHub Actions to Node 20 (#9483) ### 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 --- .github/actions/setup-node/action.yml | 2 +- .github/actions/setup-rust/action.yml | 4 ++-- .github/workflows/bench-turborepo.yml | 8 ++++---- .github/workflows/lsp.yml | 5 +++-- .github/workflows/test-js-packages.yml | 4 ++-- .../turborepo-compare-cache-item.yml | 4 ++-- .../workflows/turborepo-native-lib-test.yml | 2 +- .github/workflows/turborepo-release.yml | 19 ++++++++----------- .github/workflows/turborepo-test.yml | 18 +++++++++--------- 9 files changed, 32 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index e4be4981f6407..b117d02b0ea53 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -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 diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index e31772416a302..91b926b0daabe 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -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 }} diff --git a/.github/workflows/bench-turborepo.yml b/.github/workflows/bench-turborepo.yml index ef8172b3c8835..c200b9041070a 100644 --- a/.github/workflows/bench-turborepo.yml +++ b/.github/workflows/bench-turborepo.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/.github/workflows/lsp.yml b/.github/workflows/lsp.yml index 23d121ffdf153..d58abcf1ef177 100644 --- a/.github/workflows/lsp.yml +++ b/.github/workflows/lsp.yml @@ -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 diff --git a/.github/workflows/test-js-packages.yml b/.github/workflows/test-js-packages.yml index 47202a6eed8c6..1ff4fb2f837b9 100644 --- a/.github/workflows/test-js-packages.yml +++ b/.github/workflows/test-js-packages.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/turborepo-compare-cache-item.yml b/.github/workflows/turborepo-compare-cache-item.yml index 6e35b519c6ff6..11bc540d5ab71 100644 --- a/.github/workflows/turborepo-compare-cache-item.yml +++ b/.github/workflows/turborepo-compare-cache-item.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 @@ -51,7 +51,7 @@ jobs: steps: - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 diff --git a/.github/workflows/turborepo-native-lib-test.yml b/.github/workflows/turborepo-native-lib-test.yml index 8368d2a55669d..ff971e4d7c3f8 100644 --- a/.github/workflows/turborepo-native-lib-test.yml +++ b/.github/workflows/turborepo-native-lib-test.yml @@ -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 }} diff --git a/.github/workflows/turborepo-release.yml b/.github/workflows/turborepo-release.yml index 7aad56e181af4..4e627e9c3df5b 100644 --- a/.github/workflows/turborepo-release.yml +++ b/.github/workflows/turborepo-release.yml @@ -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: @@ -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 @@ -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 @@ -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 @@ -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 }}" @@ -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 }} @@ -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 @@ -207,7 +204,7 @@ jobs: git config --global user.email 'turbobot@vercel.com' - name: Install GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser-pro version: v1.18.2 @@ -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 diff --git a/.github/workflows/turborepo-test.yml b/.github/workflows/turborepo-test.yml index f505d66eddf44..e6b982cf0c35a 100644 --- a/.github/workflows/turborepo-test.yml +++ b/.github/workflows/turborepo-test.yml @@ -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 @@ -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 @@ -141,7 +141,7 @@ 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: @@ -149,7 +149,7 @@ jobs: - 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 }} @@ -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. @@ -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 @@ -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 @@ -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 @@ -300,7 +300,7 @@ jobs: node-version: "18.20.2" - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 + uses: mozilla-actions/sccache-action@v0.0.6 - name: Run tests timeout-minutes: 120