Skip to content

Commit

Permalink
fix(yarn2-install): improve caching
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Nov 29, 2022
1 parent 3248250 commit 7ae2c99
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions yarn2-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ runs:
node-version: ${{ inputs.node-version }}
cache: 'yarn'

- name: 'Get yarn cache directory path'
id: find-cache-dir
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: tooling

- name: 'Restore yarn cache'
uses: actions/cache@v3
with:
path: ${{ steps.find-cache-dir.outputs.dir }}
key: ${{ runner.os }}-yarn2-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
${{ runner.os }}-yarn2-
- name: 'Install yarn dependencies'
run: yarn install ${{ inputs.yarn-args }}
shell: bash

0 comments on commit 7ae2c99

Please sign in to comment.