feat(FN-4441): complete Step 1 — add node_modules cache layer
Fusion-Task-Id: FN-4441 Fusion-Task-Lineage: e3d7d9fe-cd8e-4c00-bb13-0fdb9ce91c34
This commit is contained in:
15
.github/actions/setup-node-pnpm/action.yml
vendored
15
.github/actions/setup-node-pnpm/action.yml
vendored
@@ -30,7 +30,20 @@ runs:
|
||||
cache: pnpm
|
||||
registry-url: ${{ inputs.registry-url }}
|
||||
|
||||
- name: Install dependencies
|
||||
# Cache node_modules only for the exact pnpm-lock.yaml hash and Node/OS tuple.
|
||||
# Intentionally no restore-keys fallback: partial restores can create inconsistent trees.
|
||||
- name: Cache node_modules
|
||||
id: node-modules-cache
|
||||
if: ${{ inputs.skip-install != 'true' }}
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
**/node_modules
|
||||
!**/.cache
|
||||
key: node-modules-${{ runner.os }}-node${{ inputs.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: ${{ inputs.skip-install != 'true' && steps.node-modules-cache.outputs.cache-hit != 'true' }}
|
||||
shell: bash
|
||||
run: pnpm install ${{ inputs.install-args }}
|
||||
|
||||
Reference in New Issue
Block a user