Skip to content

Commit

Permalink
Enable yarn cache
Browse files Browse the repository at this point in the history
  • Loading branch information
moreal committed Oct 24, 2024
1 parent 423df9f commit cfaa81c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22

- run: corepack enable

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

- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn install --immutable
Expand Down

0 comments on commit cfaa81c

Please sign in to comment.