0
0
mirror of https://github.com/sp-tarkov/build.git synced 2025-02-13 01:30:46 -05:00

Dynamically fetch the npm cache directory

This commit is contained in:
Refringe 2025-01-03 17:17:23 -05:00
parent d41ea4a6cf
commit b1604340a8
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k

View File

@ -219,12 +219,17 @@ jobs:
cache: "npm" cache: "npm"
cache-dependency-path: "SPT/Build/server/project/package.json" cache-dependency-path: "SPT/Build/server/project/package.json"
- name: Get npm cache directory
id: npm-cache-dir
shell: pwsh
run: echo "dir=$(npm config get cache)" >> ${env:GITHUB_OUTPUT}
- name: Check NPM Cache - name: Check NPM Cache
id: cache-check id: cache-check
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ~/.npm path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('SPT/Build/server/project/package.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-node- ${{ runner.os }}-node-