Unverified Commit 67d5f961 authored by Benjamin Woodruff's avatar Benjamin Woodruff Committed by GitHub

[ci] Explicitly disable package-manager-cache for uses of actions/setup-node (#93953)

If this action detects that you're likely using `npm` it (by default)
enables a cache for `npm`. We use `pnpm`, so it doesn't do anything (and
we manually set up a pnpm cache in some places), but the implicit
behavior here is a little dangerous: e.g.
https://adnanthekhan.com/posts/angular-compromise-through-dev-infra/#finding-the-pivot

So let's explicitly disable this everywhere. It wasn't doing anything
for us anyways.
parent fda8a605
...@@ -56,6 +56,7 @@ jobs: ...@@ -56,6 +56,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
...@@ -124,6 +125,7 @@ jobs: ...@@ -124,6 +125,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
...@@ -248,6 +250,7 @@ jobs: ...@@ -248,6 +250,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Prepare corepack - name: Prepare corepack
if: ${{ matrix.os != 'windows' }} if: ${{ matrix.os != 'windows' }}
...@@ -401,6 +404,7 @@ jobs: ...@@ -401,6 +404,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- run: corepack enable - run: corepack enable
- name: Install Rust - name: Install Rust
...@@ -447,6 +451,7 @@ jobs: ...@@ -447,6 +451,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
...@@ -512,6 +517,7 @@ jobs: ...@@ -512,6 +517,7 @@ jobs:
node-version: 24 node-version: 24
check-latest: true check-latest: true
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
......
...@@ -150,10 +150,11 @@ jobs: ...@@ -150,10 +150,11 @@ jobs:
NEXT_SKIP_NATIVE_POSTINSTALL: 1 NEXT_SKIP_NATIVE_POSTINSTALL: 1
steps: steps:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup pnpm - name: Setup pnpm
run: | run: |
...@@ -227,9 +228,10 @@ jobs: ...@@ -227,9 +228,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20 node-version: 20
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
......
...@@ -27,10 +27,11 @@ jobs: ...@@ -27,10 +27,11 @@ jobs:
environment: release-${{ github.event.inputs.releaseType }} environment: release-${{ github.event.inputs.releaseType }}
steps: steps:
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20 node-version: 20
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
......
...@@ -30,10 +30,11 @@ jobs: ...@@ -30,10 +30,11 @@ jobs:
steps: steps:
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20 node-version: 20
check-latest: true check-latest: true
package-manager-cache: false
- name: Create GitHub App token - name: Create GitHub App token
id: release-app-token id: release-app-token
......
...@@ -10,7 +10,9 @@ jobs: ...@@ -10,7 +10,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
......
...@@ -11,7 +11,9 @@ jobs: ...@@ -11,7 +11,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
......
...@@ -155,9 +155,10 @@ jobs: ...@@ -155,9 +155,10 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
package-manager-cache: false
- name: Install dependencies - name: Install dependencies
if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }} if: ${{ steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}
......
...@@ -65,6 +65,7 @@ jobs: ...@@ -65,6 +65,7 @@ jobs:
with: with:
node-version: '24' node-version: '24'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
package-manager-cache: false
- name: Enable corepack - name: Enable corepack
run: corepack enable run: corepack enable
......
...@@ -39,10 +39,11 @@ jobs: ...@@ -39,10 +39,11 @@ jobs:
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
...@@ -100,10 +101,11 @@ jobs: ...@@ -100,10 +101,11 @@ jobs:
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -73,6 +73,7 @@ jobs: ...@@ -73,6 +73,7 @@ jobs:
with: with:
node-version: 20 node-version: 20
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
if: steps.precheck.outputs.should_evaluate == 'true' if: steps.precheck.outputs.should_evaluate == 'true'
......
...@@ -37,10 +37,11 @@ jobs: ...@@ -37,10 +37,11 @@ jobs:
uses: ./.github/actions/setup-rust uses: ./.github/actions/setup-rust
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- run: corepack enable - run: corepack enable
# We need to install the dependencies for the benchmark apps # We need to install the dependencies for the benchmark apps
......
...@@ -52,10 +52,11 @@ jobs: ...@@ -52,10 +52,11 @@ jobs:
next-version: ${{ steps.version.outputs.value }} next-version: ${{ steps.version.outputs.value }}
steps: steps:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup pnpm - name: Setup pnpm
run: | run: |
...@@ -274,10 +275,11 @@ jobs: ...@@ -274,10 +275,11 @@ jobs:
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20.9.0 node-version: 20.9.0
check-latest: true check-latest: true
package-manager-cache: false
- name: Download adapter test result artifacts - name: Download adapter test result artifacts
continue-on-error: true continue-on-error: true
......
...@@ -27,10 +27,11 @@ jobs: ...@@ -27,10 +27,11 @@ jobs:
if: github.repository_owner == 'vercel' if: github.repository_owner == 'vercel'
steps: steps:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup pnpm - name: Setup pnpm
run: | run: |
......
...@@ -35,10 +35,11 @@ jobs: ...@@ -35,10 +35,11 @@ jobs:
run: sudo ethtool -K eth0 tx off rx off run: sudo ethtool -K eth0 tx off rx off
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20 node-version: 20
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
npm i -g corepack@0.31 npm i -g corepack@0.31
......
...@@ -47,10 +47,11 @@ jobs: ...@@ -47,10 +47,11 @@ jobs:
steps: steps:
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: 20 node-version: 20
check-latest: true check-latest: true
package-manager-cache: false
- name: Create GitHub App token - name: Create GitHub App token
id: release-app-token id: release-app-token
......
...@@ -39,10 +39,11 @@ jobs: ...@@ -39,10 +39,11 @@ jobs:
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
...@@ -96,10 +97,11 @@ jobs: ...@@ -96,10 +97,11 @@ jobs:
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -41,10 +41,11 @@ jobs: ...@@ -41,10 +41,11 @@ jobs:
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -47,10 +47,11 @@ jobs: ...@@ -47,10 +47,11 @@ jobs:
token: ${{ steps.release-app-token.outputs.token }} token: ${{ steps.release-app-token.outputs.token }}
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Setup corepack - name: Setup corepack
run: | run: |
......
...@@ -19,10 +19,11 @@ jobs: ...@@ -19,10 +19,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Setup node - name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
- name: Checkout - name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
......
...@@ -28,6 +28,7 @@ jobs: ...@@ -28,6 +28,7 @@ jobs:
with: with:
node-version: ${{ env.NODE_LTS_VERSION }} node-version: ${{ env.NODE_LTS_VERSION }}
check-latest: true check-latest: true
package-manager-cache: false
# Checkout from the default branch (canary) -- workflow_run always uses # Checkout from the default branch (canary) -- workflow_run always uses
# the default branch's version of the workflow file and this checkout # the default branch's version of the workflow file and this checkout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment