From a27d783451f66ab64f9787bb79806ae2ff9954f8 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Sun, 23 Feb 2025 22:27:13 -0600 Subject: [PATCH] feat(ci): base cache key on package-lock.json --- .github/workflows/pull-request.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 379d34b..fc46281 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -21,12 +21,19 @@ jobs: cache: 'npm' cache-dependency-path: '**/package-lock.json' + - name: Cache NPM dependencies + uses: actions/cache@v4 + with: + path: ~/.npm + key: npm-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + npm-cache-${{ runner.os }}- + - name: Install Dependencies and Build run: | npm ci npx prisma generate npm run build:prod - env: CI: true @@ -35,4 +42,4 @@ jobs: with: path: ~/.npm/_npx key: prisma-binary-${{ runner.os }}-${{ hashFiles('package-lock.json') }} - restore-keys: prisma-binary-${{ runner.os }}- \ No newline at end of file + restore-keys: prisma-binary-${{ runner.os }}-