From 0c2993f86d1000e3f6abfa489439d32cec3f2d92 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Sat, 6 Jul 2024 00:39:52 -0400 Subject: [PATCH] chore: use npm cache in GA workflow --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da7e687b..3cad4032 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,11 +26,13 @@ jobs: fetch-depth: 3 - uses: actions/cache@v3 + id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' with: - path: ~/.cache/yarn - key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- + - name: Set Node.js version uses: actions/setup-node@v3 with: