From 8dc241e75aea74e870888224ae29fa9531ee5d84 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Thu, 14 Nov 2019 00:33:03 +0900 Subject: [PATCH] docs: update cache step example for yarn https://github.com/actions/cache/blob/master/examples.md#node---yarn https://github.com/actions/cache/pull/70 --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd494ba..f1d3a93 100644 --- a/README.md +++ b/README.md @@ -486,11 +486,15 @@ jobs: with: node-version: '10.x' + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - name: Cache dependencies uses: actions/cache@v1 with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn-