From 45dab9e7b8f98e8ebe23a391f4e817dea70c926e Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 1 Aug 2022 15:16:39 +0200 Subject: [PATCH] chore: improve caching node_modules --- .github/workflows/default.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 33825f587..7949037d0 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -51,22 +51,27 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node uses: actions/setup-node@v2 with: node-version: "16" - - name: Cache NPM modules - uses: actions/cache@v2 - with: - path: | - **/node_modules - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- + - name: Get NPM cache dir + id: npm-cache-dir + run: | + echo "::set-output name=dir::$(npm config get cache)" - - name: Checkout - uses: actions/checkout@v3 + - name: Cache NPM modules + uses: actions/cache@v3 + id: npm-cache + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Install tools run: make install-ui