Skip to content

Commit 3186a07

Browse files
committed
feat(github-actions): use package-manager-cache input in checkout-and-setup-node (#3024)
The `cache` input in `actions/setup-node` is deprecated and will be removed in a future version. This commit updates the `checkout-and-setup-node` action to use the new `package-manager-cache` input instead. PR Close #3024
1 parent a8cabed commit 3186a07

File tree

1 file changed

+1
-4
lines changed
  • github-actions/npm/checkout-and-setup-node

1 file changed

+1
-4
lines changed

github-actions/npm/checkout-and-setup-node/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ runs:
4949
run: |
5050
PM=$(jq -r '.packageManager | match("^(npm|pnpm|yarn)@").captures[0].string' package.json || echo "")
5151
echo "PACKAGE_MANAGER=$PM" >> "$GITHUB_OUTPUT"
52-
if [ "$PM" == "pnpm" ]; then
53-
echo "CACHE_MANAGER_VALUE=pnpm" >> "$GITHUB_OUTPUT"
54-
fi
5552
5653
- if: steps.packageManager.outputs.PACKAGE_MANAGER == 'pnpm'
5754
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
@@ -63,4 +60,4 @@ runs:
6360
node-version-file: ${{ inputs.node-version-file-path }}
6461
node-version: ${{ inputs.node-version }}
6562
cache-dependency-path: ${{ inputs.cache-dependency-path }}
66-
cache: ${{ inputs.disable-package-manager-cache != 'true' && steps.packageManager.outputs.CACHE_MANAGER_VALUE || '' }}
63+
package-manager-cache: ${{ inputs.disable-package-manager-cache != 'true' }}

0 commit comments

Comments
 (0)