From 75630ef19d3329c03d85b44dd905152c00a7e072 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Fri, 5 Jan 2024 01:58:00 +0530 Subject: [PATCH] fix: npm action --- .github/actions/node-install/action.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/actions/node-install/action.yml b/.github/actions/node-install/action.yml index 351598182..77483a9a4 100644 --- a/.github/actions/node-install/action.yml +++ b/.github/actions/node-install/action.yml @@ -12,23 +12,28 @@ runs: with: node-version: ${{ inputs.node_version }} - - name: Cache node modules - id: cache-npm + - name: Cache npm uses: actions/cache@v3 - env: - cache-name: cache-node-modules with: path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }} + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: npm- + + - name: Cache node_modules + uses: actions/cache@v3 + id: cache-node-modules + with: + path: | + node_modules + packages/*/node_modules + apps/*/node_modules + key: modules-${{ hashFiles('package-lock.json') }} - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' shell: bash run: | - npm ci + npm ci --no-audit npm run prisma:generate env: HUSKY: '0'