docs: update cache step example for yarn
https://github.com/actions/cache/blob/master/examples.md#node---yarn https://github.com/actions/cache/pull/70
This commit is contained in:
parent
20ef467283
commit
8dc241e75a
|
@ -486,11 +486,15 @@ jobs:
|
|||
with:
|
||||
node-version: '10.x'
|
||||
|
||||
- name: Get yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/yarn
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
|
|
Loading…
Reference in New Issue