From 93fd8aedb3ba031073734732f84ada902de70ac9 Mon Sep 17 00:00:00 2001 From: himself65 Date: Mon, 27 Mar 2023 18:09:42 -0500 Subject: [PATCH] ci: setup cache for yarn --- .github/actions/setup-node/action.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index d9411955ef..6ff6420e4b 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -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