diff options
author | Florian Merz <me@fiji-flo.de> | 2021-03-12 07:37:56 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-03-12 07:40:46 +0100 |
commit | 45e3baafba07a4435b62f67b586de13e1108488a (patch) | |
tree | 93240598e954d7e29bdaa6accc1e000484f072a9 /.github/workflows/pr-test.yml | |
parent | 532206cd2f9fb2ba750416b553d6744fab8cb01d (diff) | |
download | translated-content-45e3baafba07a4435b62f67b586de13e1108488a.tar.gz translated-content-45e3baafba07a4435b62f67b586de13e1108488a.tar.bz2 translated-content-45e3baafba07a4435b62f67b586de13e1108488a.zip |
fix caching
Diffstat (limited to '.github/workflows/pr-test.yml')
-rw-r--r-- | .github/workflows/pr-test.yml | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index af6fada9aa..be61826133 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -33,16 +33,19 @@ jobs: with: node-version: "12" - - name: Cache node_modules - uses: actions/cache@v2.1.4 - id: cached-node_modules + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2.1.4 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: - path: | - {{ github.workspace }}/mdn/content/node_modules - key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-1 + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- - name: Install all yarn packages - if: steps.cached-node_modules.outputs.cache-hit != 'true' working-directory: ${{ github.workspace }}/mdn/content run: | yarn --frozen-lockfile |