From 60e1a4b9bb9fc26b3cdf21dcff6a14c501bb8742 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 15 Mar 2024 00:27:19 +0100 Subject: [PATCH] ci: use cache feature of @actions/setup-node --- .github/workflows/build-and-release.yaml | 2 +- .github/workflows/pr-check_compliance.yaml | 8 +------- .github/workflows/pr-clang-format.yaml | 8 +------- .github/workflows/update-from-ncs.yaml | 8 +------- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-and-release.yaml b/.github/workflows/build-and-release.yaml index faf902fe..ea403956 100644 --- a/.github/workflows/build-and-release.yaml +++ b/.github/workflows/build-and-release.yaml @@ -207,5 +207,5 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.x" - + cache: "npm" - run: npx semantic-release diff --git a/.github/workflows/pr-check_compliance.yaml b/.github/workflows/pr-check_compliance.yaml index 847899b9..cae71c7e 100644 --- a/.github/workflows/pr-check_compliance.yaml +++ b/.github/workflows/pr-check_compliance.yaml @@ -20,13 +20,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.x" - - uses: actions/cache@v4 - name: Cache dependencies - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: "npm" - uses: actions/checkout@v4 - name: Install dependencies run: npm ci diff --git a/.github/workflows/pr-clang-format.yaml b/.github/workflows/pr-clang-format.yaml index 889c36f3..d0467cf0 100644 --- a/.github/workflows/pr-clang-format.yaml +++ b/.github/workflows/pr-clang-format.yaml @@ -17,13 +17,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.x" - - uses: actions/cache@v4 - name: Cache dependencies - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: "npm" - name: Install dependencies run: npm ci - name: Get NCS version diff --git a/.github/workflows/update-from-ncs.yaml b/.github/workflows/update-from-ncs.yaml index 436d60df..91c3c3d7 100644 --- a/.github/workflows/update-from-ncs.yaml +++ b/.github/workflows/update-from-ncs.yaml @@ -23,13 +23,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.x" - - uses: actions/cache@v4 - name: Cache dependencies - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: "npm" - name: Install dependencies run: npm ci - name: Get NCS version