From 2bbbe1098a71fab800ea3486c2d381037e816f14 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Fri, 5 Jan 2024 01:32:47 +0530 Subject: [PATCH] fix: action --- .github/actions/cache-build/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/cache-build/action.yml b/.github/actions/cache-build/action.yml index 9c0b1feae..ca7550c76 100644 --- a/.github/actions/cache-build/action.yml +++ b/.github/actions/cache-build/action.yml @@ -12,11 +12,11 @@ runs: id: production-build-cache env: cache-name: prod-build - key-1: ${{ hashFiles('**/package-lock.json') }} - key-2: ${{ github.run_id }} - + key-1: ${{ inputs.node_version }}-${{ hashFiles('**/package-lock.json') }} + key-2: ${{ hashFiles('apps/**/**.[jt]s', 'apps/**/**.[jt]sx', 'packages/**/**.[jt]s', 'packages/**/**.[jt]sx', '!**/node_modules') }} + key-3: ${{ github.event.pull_request.number || github.ref }} # Ensures production-build.yml will always be fresh - key-3: ${{ github.sha }} + key-4: ${{ github.sha }} with: path: | ${{ github.workspace }}/apps/web/.next @@ -24,7 +24,7 @@ runs: **/.turbo/** **/dist/** - key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }} + key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.key-1 }}-${{ env.key-2 }}-${{ env.key-3 }}-${{ env.key-4 }} - run: npm run build shell: bash