diff options
author | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-25 13:26:02 -0600 |
---|---|---|
committer | TymanWasTaken <32660892+tymanwastaken@users.noreply.github.com> | 2021-05-25 13:26:02 -0600 |
commit | 1a59d22139a6bebf1ac011b92bc4219272ad634a (patch) | |
tree | 0743ee80b83b8d2b69334db29526515636deff01 | |
parent | 3bf58e35329ad223878d1129924df9047023984c (diff) | |
download | tanzanite-1a59d22139a6bebf1ac011b92bc4219272ad634a.tar.gz tanzanite-1a59d22139a6bebf1ac011b92bc4219272ad634a.tar.bz2 tanzanite-1a59d22139a6bebf1ac011b92bc4219272ad634a.zip |
add caching to workflow
-rw-r--r-- | .github/workflows/nodejs.yml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ff4aa95..7fc5058 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -18,6 +18,16 @@ jobs: uses: actions/setup-node@v1 with: node-version: 14.x + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + 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 - name: Fix config @@ -40,6 +50,16 @@ jobs: uses: actions/setup-node@v1 with: node-version: 14.x + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + 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 - name: Configure git |