0
0
mirror of https://github.com/sp-tarkov/build.git synced 2025-02-12 14:50:44 -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-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
id: cache-check
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('SPT/Build/server/project/package.json') }}
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-