From e0c60b625bb87e8069a224c36b094eb06bc37fb6 Mon Sep 17 00:00:00 2001
From: Michael Kriese <michael.kriese@visualon.de>
Date: Fri, 26 Apr 2024 13:58:01 +0200
Subject: [PATCH] ci: use `pnpm/action-setup` action (#28685)

---
 .github/actions/setup-node/action.yml   |  7 +++--
 .github/workflows/build.yml             | 37 +++++++++++++++++++------
 .github/workflows/codeql-analysis.yml   |  2 ++
 .github/workflows/dependency-review.yml |  2 ++
 .github/workflows/devcontainer.yml      |  2 ++
 .github/workflows/scorecard.yml         |  1 +
 .github/workflows/update-data.yml       |  9 ++++--
 .github/workflows/ws_scan.yaml          |  2 ++
 8 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml
index 2b9badcc7d..b0b6e2bc36 100644
--- a/.github/actions/setup-node/action.yml
+++ b/.github/actions/setup-node/action.yml
@@ -47,9 +47,10 @@ runs:
           (steps.node-modules-restore.outputs.cache-hit == 'true') && 'true' || ''
         }}' >> "$GITHUB_ENV"
 
-    - name: Enable corepack
-      shell: bash
-      run: corepack enable
+    - name: Setup pnpm
+      uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
+      with:
+        standalone: true
 
     - name: Setup Node
       uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3c05cd5102..a6bd034017 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -95,8 +95,9 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
         with:
-          sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
           filter: blob:none # we don't need all blobs
+          sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
+          show-progress: false
 
       - name: Calculate matrix for `node_modules` prefetch
         uses: ./.github/actions/calculate-prefetch-matrix
@@ -152,8 +153,9 @@ jobs:
         if: needs.setup.outputs.os-matrix-is-full && runner.os != 'Linux'
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
         with:
-          sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
           filter: blob:none # we don't need all blobs
+          sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
+          show-progress: false
 
       - name: Setup Node.js
         if: needs.setup.outputs.os-matrix-is-full && runner.os != 'Linux'
@@ -174,6 +176,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -217,6 +221,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -257,6 +263,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -284,6 +292,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -321,6 +331,8 @@ jobs:
 
     steps:
       - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -384,6 +396,7 @@ jobs:
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
         with:
           filter: blob:none # we don't need all blobs
+          show-progress: false
 
       - name: Download coverage reports
         uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
@@ -410,8 +423,9 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
         with:
-          sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
           filter: blob:none # we don't need all blobs
+          sparse-checkout: ${{ env.SPARSE_CHECKOUT }}
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -498,6 +512,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -530,6 +546,8 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Setup Node.js
         uses: ./.github/actions/setup-node
@@ -556,16 +574,19 @@ jobs:
     steps:
       - name: Checkout code
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
+
+      - name: Setup pnpm
+        uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
+        with:
+          standalone: true
 
       - name: Setup Node.js
         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
         with:
           node-version: ${{ env.NODE_VERSION }}
 
-      - name: Enable corepack
-        shell: bash
-        run: corepack enable
-
       - name: Download package
         uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
         with:
@@ -604,8 +625,8 @@ jobs:
       - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
         with:
           fetch-depth: 0 # zero stands for full checkout, which is required for semantic-release
-          show-progress: false
           filter: blob:none # we don't need all blobs, only the full tree
+          show-progress: false
 
       - name: docker-config
         uses: containerbase/internal-tools@75d68da3c8cd3d622cf6d4b8d2dfe7e4dc33dfed # v3.0.78
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 6a09b627ae..e97fbbbef0 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -32,6 +32,8 @@ jobs:
     steps:
       - name: Checkout repository
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Delete fixtures to suppress false positives
         run: |
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
index 4db3b12947..0fa95315e9 100644
--- a/.github/workflows/dependency-review.yml
+++ b/.github/workflows/dependency-review.yml
@@ -10,6 +10,8 @@ jobs:
     steps:
       - name: 'Checkout Repository'
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: 'Dependency Review'
         uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5
diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml
index 5408e72ac5..301f770c90 100644
--- a/.github/workflows/devcontainer.yml
+++ b/.github/workflows/devcontainer.yml
@@ -19,6 +19,8 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Build and run dev container task
         uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8 # v0.3.1900000349
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
index fd8da18468..26a2783904 100644
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -23,6 +23,7 @@ jobs:
         uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
         with:
           persist-credentials: false
+          show-progress: false
 
       - name: 'Run analysis'
         uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
diff --git a/.github/workflows/update-data.yml b/.github/workflows/update-data.yml
index 51a0c88cba..de8dd67c12 100644
--- a/.github/workflows/update-data.yml
+++ b/.github/workflows/update-data.yml
@@ -18,10 +18,13 @@ jobs:
       pull-requests: write
     steps:
       - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
-      - name: Enable corepack
-        shell: bash
-        run: corepack enable
+      - name: Setup pnpm
+        uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
+        with:
+          standalone: true
 
       - name: Set up Node.js ${{ env.NODE_VERSION }}
         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
diff --git a/.github/workflows/ws_scan.yaml b/.github/workflows/ws_scan.yaml
index d9dae9c518..eb533dc6cb 100644
--- a/.github/workflows/ws_scan.yaml
+++ b/.github/workflows/ws_scan.yaml
@@ -12,6 +12,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
+        with:
+          show-progress: false
 
       - name: Download UA
         run: curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
-- 
GitLab