mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-22 10:31:17 +01:00
chore: Use setup-node action to cache dependencies
This commit is contained in:
parent
0d47d164e9
commit
e050ebdd63
1 changed files with 1 additions and 11 deletions
12
.github/workflows/check-dist.yml
vendored
12
.github/workflows/check-dist.yml
vendored
|
@ -27,17 +27,7 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 16.x
|
||||||
- name: Determine npm cache directory
|
cache: npm
|
||||||
id: npm-cache
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=dir::$(npm config get cache)"
|
|
||||||
- name: Restore npm cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ${{ steps.npm-cache.outputs.dir }}
|
|
||||||
key: check-dist-${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
check-dist-${{ runner.os }}-node-
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Rebuild the dist/ directory
|
- name: Rebuild the dist/ directory
|
||||||
|
|
Loading…
Reference in a new issue