Skip to content

Commit

Permalink
feat(setup): allow configure pnpm configure node_modules paths
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Feb 14, 2025
1 parent 0100a7e commit b32888b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'Setup node and pnpm'
required: false
default: 'true'
pnpm-cache:
description: 'Paths to pnpm node_modules to cache'
required: false
default: 'node_modules'
save-cache:
description: 'Save cache when needed'
required: false
Expand Down Expand Up @@ -38,7 +42,7 @@ runs:
if: inputs.node == 'true'
id: node-modules-restore
with:
path: node_modules
path: ${{ inputs.pnpm-cache }}
key: ${{ env.CACHE_KEY }}
enableCrossOsArchive: true

Expand Down Expand Up @@ -71,7 +75,7 @@ runs:
- if: inputs.node == 'true' && inputs.save-cache == 'true' && env.CACHE_HIT != 'true'
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: node_modules
path: ${{ inputs.pnpm-cache }}
key: ${{ env.CACHE_KEY }}
enableCrossOsArchive: true

Expand Down

0 comments on commit b32888b

Please sign in to comment.