From 0fd49330d3218ec5f1bc62b72ace28e79d02bc93 Mon Sep 17 00:00:00 2001 From: TC Date: Tue, 24 Nov 2020 00:12:55 +0100 Subject: [PATCH] CI: cache yarn directory --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65fbf357..67feb14a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,18 @@ jobs: with: node-version: "12.x" + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + 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: Install dependencies run: yarn --frozen-lockfile