From 4d590e5e26f2a6d8ef486f920824bb8446f5653e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Dahlgren?= Date: Thu, 7 Oct 2021 21:30:26 +0200 Subject: [PATCH] Use builtin cache logic in setup-node action for GitHub Actions --- .github/workflows/node.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 5b90bce..d74829f 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -31,22 +31,10 @@ jobs: uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Cache npm dependencies - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }} - restore-keys: | - ${{ matrix.os }}-node-${{ matrix.node-version }}- + cache: npm - name: Install npm dependencies run: npm install