Skip to content

Commit

Permalink
CI: use custom (better) Yarn cache strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnzlml committed Jul 15, 2022
1 parent 66e29f6 commit 7ec627f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/continuous-integration-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ jobs:
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

# https://github.com/actions/cache
- name: Restore Yarn cache
uses: actions/[email protected]
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: Install Yarn dependencies
run: yarn install --immutable
Expand Down

0 comments on commit 7ec627f

Please sign in to comment.