[ci:force] - Fixed cache hit for npmn

This commit is contained in:
VitoAlbano
2026-06-04 09:26:33 +01:00
parent 6c5425e69c
commit 7fa80d230d
4 changed files with 2 additions and 38 deletions
+2 -20
View File
@@ -1,11 +1,6 @@
name: 'Setup'
description: 'Initialize cache, env var load'
inputs:
enable-node-modules-cache:
description: 'enable caching for node modules'
required: false
type: boolean
default: 'true'
cache-suffix:
description: 'Suffix to make Nx cache key unique per job (e.g. matrix project name)'
required: false
@@ -24,9 +19,6 @@ outputs:
npm-tag:
description: 'NPM tag'
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
node-modules-cache-hit:
description: 'Whether node_modules cache was hit'
value: ${{ steps.node-modules-cache.outputs.cache-hit }}
runs:
using: "composite"
steps:
@@ -48,19 +40,9 @@ runs:
if: ${{ inputs.full-setup == 'true' }}
id: set-npm-tag
uses: ./.github/actions/set-npm-tag
- name: Get pnpm store directory
id: pnpm-cache
- name: Install dependencies
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Cache pnpm store
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
run: pnpm install --frozen-lockfile
- name: Restore nx cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with: