Skip to content

Commit

Permalink
chore(ci): better yarn github cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodonisko committed Aug 25, 2022
1 parent a446583 commit af31880
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: install yarn
run: npm install -g yarn
# Get the yarn cache path.
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v3
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: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- name: install deps
run: yarn --immutable
- name: check files for correct formatting
Expand Down

0 comments on commit af31880

Please sign in to comment.