diff --git a/.github/actions/setup-nodejs/action.yml b/.github/actions/setup-nodejs/action.yml index ba01558d559..13fba2f7c7f 100644 --- a/.github/actions/setup-nodejs/action.yml +++ b/.github/actions/setup-nodejs/action.yml @@ -22,6 +22,10 @@ inputs: description: 'Command to execute for installing project dependencies. Leave empty to skip install step.' required: false default: 'pnpm install --frozen-lockfile' + cache-dependency-path: + description: 'Path(s) to the lockfile(s) used to compute the pnpm-store cache key. Scope this down (e.g. to `.github/scripts/pnpm-lock.yaml`) when only installing a subset, to avoid restoring the full workspace store.' + required: false + default: 'pnpm-lock.yaml' runs: using: 'composite' @@ -34,6 +38,7 @@ runs: with: node-version: ${{ inputs.node-version }} cache: 'pnpm' + cache-dependency-path: ${{ inputs.cache-dependency-path }} # To avoid setup-node cache failure. # see: https://github.com/actions/setup-node/issues/1137 diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 53269d1a7b7..26716cab252 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -33,13 +33,14 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: token: ${{ steps.generate-token.outputs.token }} - fetch-depth: 0 + fetch-depth: 1 - name: Setup Node.js uses: ./.github/actions/setup-nodejs with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Compute backport targets id: targets diff --git a/.github/workflows/ci-detect-new-packages.yml b/.github/workflows/ci-detect-new-packages.yml index cb0501f3630..0e50c1b9dd2 100644 --- a/.github/workflows/ci-detect-new-packages.yml +++ b/.github/workflows/ci-detect-new-packages.yml @@ -21,6 +21,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Check for new unpublished packages id: detect diff --git a/.github/workflows/ci-pr-quality.yml b/.github/workflows/ci-pr-quality.yml index 45f0b8eab57..d34951a901f 100644 --- a/.github/workflows/ci-pr-quality.yml +++ b/.github/workflows/ci-pr-quality.yml @@ -37,6 +37,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Re-request PR Size Limit check env: @@ -69,6 +70,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Check ownership checkbox env: @@ -101,6 +103,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Check PR size env: diff --git a/.github/workflows/release-create-github-releases.yml b/.github/workflows/release-create-github-releases.yml index 71b7ab715f0..c6ba248c992 100644 --- a/.github/workflows/release-create-github-releases.yml +++ b/.github/workflows/release-create-github-releases.yml @@ -71,6 +71,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Create GitHub releases env: diff --git a/.github/workflows/release-create-patch-pr.yml b/.github/workflows/release-create-patch-pr.yml index 63bfef0d006..572b6b65488 100644 --- a/.github/workflows/release-create-patch-pr.yml +++ b/.github/workflows/release-create-patch-pr.yml @@ -35,6 +35,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Determine release candidate branch from track id: determine-branch diff --git a/.github/workflows/release-create-pr.yml b/.github/workflows/release-create-pr.yml index 6bd6b96712c..75f65015db4 100644 --- a/.github/workflows/release-create-pr.yml +++ b/.github/workflows/release-create-pr.yml @@ -80,6 +80,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Setup corepack and pnpm run: | diff --git a/.github/workflows/release-populate-cloud-with-releases.yml b/.github/workflows/release-populate-cloud-with-releases.yml index 6c213202de0..5a857950f88 100644 --- a/.github/workflows/release-populate-cloud-with-releases.yml +++ b/.github/workflows/release-populate-cloud-with-releases.yml @@ -49,6 +49,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Extract changes id: get-changes diff --git a/.github/workflows/release-promote-github-release.yml b/.github/workflows/release-promote-github-release.yml index 1282a31b996..0efbfd39c0d 100644 --- a/.github/workflows/release-promote-github-release.yml +++ b/.github/workflows/release-promote-github-release.yml @@ -42,6 +42,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Promote GitHub releases env: diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index a9aa621fa69..aa14b6ac9c7 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -24,13 +24,15 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - fetch-depth: 0 + fetch-depth: 1 + fetch-tags: true - name: Setup Node.js uses: ./.github/actions/setup-nodejs with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Determine track from package version number id: determine-info diff --git a/.github/workflows/release-set-stable-npm-packages-to-latest.yml b/.github/workflows/release-set-stable-npm-packages-to-latest.yml index 5abd8f9945f..56e42524683 100644 --- a/.github/workflows/release-set-stable-npm-packages-to-latest.yml +++ b/.github/workflows/release-set-stable-npm-packages-to-latest.yml @@ -25,6 +25,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Set npm packages to latest run: node ./.github/scripts/set-latest-for-monorepo-packages.mjs diff --git a/.github/workflows/release-update-pointer-tag.yml b/.github/workflows/release-update-pointer-tag.yml index 8ada893c418..868afd89b54 100644 --- a/.github/workflows/release-update-pointer-tag.yml +++ b/.github/workflows/release-update-pointer-tag.yml @@ -53,6 +53,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Configure git author run: | diff --git a/.github/workflows/release-version-release-notification.yml b/.github/workflows/release-version-release-notification.yml index 29b0707e04c..0fa4d48a3c0 100644 --- a/.github/workflows/release-version-release-notification.yml +++ b/.github/workflows/release-version-release-notification.yml @@ -31,13 +31,14 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - fetch-depth: 0 + fetch-depth: 1 - name: Setup Node.js uses: ./.github/actions/setup-nodejs with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Send release notification env: diff --git a/.github/workflows/test-workflow-scripts-reusable.yml b/.github/workflows/test-workflow-scripts-reusable.yml index 843567075d7..cddea96514f 100644 --- a/.github/workflows/test-workflow-scripts-reusable.yml +++ b/.github/workflows/test-workflow-scripts-reusable.yml @@ -31,6 +31,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Run tests id: run-tests diff --git a/.github/workflows/util-cleanup-abandoned-release-branches.yml b/.github/workflows/util-cleanup-abandoned-release-branches.yml index ce6bb248fc0..867edf26ee8 100644 --- a/.github/workflows/util-cleanup-abandoned-release-branches.yml +++ b/.github/workflows/util-cleanup-abandoned-release-branches.yml @@ -31,6 +31,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Cleanup release branch if PR qualifies run: node .github/scripts/cleanup-release-branch.mjs diff --git a/.github/workflows/util-determine-current-version.yml b/.github/workflows/util-determine-current-version.yml index c71d031bb93..f5bbdfdd72f 100644 --- a/.github/workflows/util-determine-current-version.yml +++ b/.github/workflows/util-determine-current-version.yml @@ -26,13 +26,15 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - fetch-depth: 0 + fetch-depth: 1 + fetch-tags: true - name: Setup Node.js uses: ./.github/actions/setup-nodejs with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Extract release versions id: get-tags diff --git a/.github/workflows/util-ensure-release-candidate-branches.yml b/.github/workflows/util-ensure-release-candidate-branches.yml index 0be597b1e33..cc07fa8f6d3 100644 --- a/.github/workflows/util-ensure-release-candidate-branches.yml +++ b/.github/workflows/util-ensure-release-candidate-branches.yml @@ -21,7 +21,7 @@ jobs: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - fetch-depth: 0 + fetch-depth: 1 fetch-tags: true - name: Setup NodeJS @@ -29,6 +29,7 @@ jobs: with: build-command: '' install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace + cache-dependency-path: .github/scripts/pnpm-lock.yaml - name: Ensure release-candidate branches env: