ci: setup cache for yarn

This commit is contained in:
himself65
2023-03-27 18:09:42 -05:00
parent dc768e0ba9
commit 93fd8aedb3

View File

@@ -29,6 +29,19 @@ runs:
shell: bash
run: node scripts/module-resolve/ci.cjs
- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
if: ${{ inputs.package-install == 'true' }}
continue-on-error: true