From 104ae0aede964b2c9dc5662179d1d096b074e372 Mon Sep 17 00:00:00 2001 From: Justin Eveland Date: Mon, 20 Feb 2023 10:06:14 -0500 Subject: [PATCH] chore: cache node modules fix --- .github/workflows/pull-request.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 08efd056..1baba0fb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,18 +20,16 @@ jobs: with: node-version: 16 - - name: Get NPM Cache Directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Cache NPM + - name: Cache node_modules + id: cache-node-modules uses: actions/cache@v2 + env: + cache-name: node-modules with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + path: ~/.npm + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | - ${{ runner.os }}-node- + ${{ runner.os }}-${{ env.cache-name }}- - name: Install NPM Dependencies run: npm ci