From 82d9052973ded371987166202151ca22173dd205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Zl=C3=A1mal?= Date: Thu, 14 Jul 2022 22:13:56 -0500 Subject: [PATCH] CI: use custom (better) Yarn cache strategy See: https://github.com/actions/setup-node/issues/325 --- .../continuous-integration-javascript.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-integration-javascript.yml b/.github/workflows/continuous-integration-javascript.yml index 7846905355..9f001f2593 100644 --- a/.github/workflows/continuous-integration-javascript.yml +++ b/.github/workflows/continuous-integration-javascript.yml @@ -29,7 +29,19 @@ jobs: uses: actions/setup-node@v3.4.1 with: node-version: ${{ matrix.node-version }} - cache: 'yarn' + + - name: Get Yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + + # https://github.com/actions/cache + - name: Restore Yarn cache + uses: actions/cache@v3.0.5 + 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 Yarn dependencies run: yarn install --immutable