瀏覽代碼

Hash-pin workflow dependencies (#26338)

* Use renovatebot to hash-pin GHA

Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>

* Pin dependencies

---------

Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Pedro Nacht 2 年之前
父節點
當前提交
b637cbfc83

+ 2 - 1
.github/renovate.json

@@ -1,7 +1,8 @@
 {
 {
   "extends": [
   "extends": [
     "config:base",
     "config:base",
-    ":disableDependencyDashboard"
+    ":disableDependencyDashboard",
+    "helpers:pinGitHubActionDigests"
   ],
   ],
   "timezone": "Asia/Tokyo",
   "timezone": "Asia/Tokyo",
   "schedule": ["after 1am and before 7am every monday"],
   "schedule": ["after 1am and before 7am every monday"],

+ 9 - 9
.github/workflows/ci.yml

@@ -21,9 +21,9 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - name: Git checkout
       - name: Git checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
       - name: Install Node
       - name: Install Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
         with:
         with:
           node-version: 18
           node-version: 18
           cache: 'npm'
           cache: 'npm'
@@ -38,9 +38,9 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - name: Git checkout
       - name: Git checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
       - name: Install Node
       - name: Install Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
         with:
         with:
           node-version: 18
           node-version: 18
           cache: 'npm'
           cache: 'npm'
@@ -63,9 +63,9 @@ jobs:
       CI: ${{ matrix.CI }}
       CI: ${{ matrix.CI }}
     steps:
     steps:
       - name: Git checkout
       - name: Git checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
       - name: Install Node
       - name: Install Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
         with:
         with:
           node-version: 18
           node-version: 18
           cache: 'npm'
           cache: 'npm'
@@ -77,7 +77,7 @@ jobs:
       - name: === E2E testing ===
       - name: === E2E testing ===
         run: npm run test-e2e
         run: npm run test-e2e
       - name: Upload output screenshots
       - name: Upload output screenshots
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
         if: always()
         if: always()
         with:
         with:
           name: Output screenshots
           name: Output screenshots
@@ -89,9 +89,9 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - name: Git checkout
       - name: Git checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
       - name: Install Node
       - name: Install Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
         with:
         with:
           node-version: 18
           node-version: 18
           cache: 'npm'
           cache: 'npm'

+ 4 - 4
.github/workflows/codeql-code-scanning.yml

@@ -26,20 +26,20 @@ jobs:
 
 
     steps:
     steps:
     - name: Checkout repository
     - name: Checkout repository
-      uses: actions/checkout@v3
+      uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
 
 
     # Initializes the CodeQL tools for scanning.
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
     - name: Initialize CodeQL
-      uses: github/codeql-action/init@v2
+      uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2
       with:
       with:
         languages: ${{ matrix.language }}
         languages: ${{ matrix.language }}
         config-file: ./.github/codeql-config.yml
         config-file: ./.github/codeql-config.yml
         queries: security-and-quality
         queries: security-and-quality
 
 
     - name: Autobuild
     - name: Autobuild
-      uses: github/codeql-action/autobuild@v2
+      uses: github/codeql-action/autobuild@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2
 
 
     - name: Perform CodeQL Analysis
     - name: Perform CodeQL Analysis
-      uses: github/codeql-action/analyze@v2
+      uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2
       with:
       with:
         category: "/language:${{matrix.language}}"
         category: "/language:${{matrix.language}}"

+ 3 - 3
.github/workflows/read-size.yml

@@ -20,9 +20,9 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - name: Git checkout
       - name: Git checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
       - name: Install Node
       - name: Install Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
         with:
         with:
           node-version: 18
           node-version: 18
           cache: 'npm'
           cache: 'npm'
@@ -46,7 +46,7 @@ jobs:
           # write the output in a json file to upload it as artifact
           # write the output in a json file to upload it as artifact
           node -pe "JSON.stringify({ filesize: $FILESIZE, gzip: $FILESIZE_GZIP, treeshaken: $TREESHAKEN, treeshakenGzip: $TREESHAKEN_GZIP, pr: $PR })" > sizes.json
           node -pe "JSON.stringify({ filesize: $FILESIZE, gzip: $FILESIZE_GZIP, treeshaken: $TREESHAKEN, treeshakenGzip: $TREESHAKEN_GZIP, pr: $PR })" > sizes.json
       - name: Upload artifact
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
         with:
         with:
           name: sizes
           name: sizes
           path: sizes.json
           path: sizes.json

+ 5 - 5
.github/workflows/report-size.yml

@@ -29,7 +29,7 @@ jobs:
       # Using actions/download-artifact doesn't work here
       # Using actions/download-artifact doesn't work here
       # https://github.com/actions/download-artifact/issues/60
       # https://github.com/actions/download-artifact/issues/60
       - name: Download artifact
       - name: Download artifact
-        uses: actions/github-script@v6
+        uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
         id: download-artifact
         id: download-artifact
         with:
         with:
           result-encoding: string
           result-encoding: string
@@ -56,9 +56,9 @@ jobs:
 
 
       # This runs on the base branch of the PR, meaning "dev"
       # This runs on the base branch of the PR, meaning "dev"
       - name: Git checkout
       - name: Git checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
       - name: Install Node
       - name: Install Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
         with:
         with:
           node-version: 18
           node-version: 18
           cache: 'npm'
           cache: 'npm'
@@ -126,14 +126,14 @@ jobs:
           echo "TREESHAKEN_DIFF=$TREESHAKEN_DIFF" >> $GITHUB_OUTPUT
           echo "TREESHAKEN_DIFF=$TREESHAKEN_DIFF" >> $GITHUB_OUTPUT
 
 
       - name: Find existing comment
       - name: Find existing comment
-        uses: peter-evans/find-comment@v2
+        uses: peter-evans/find-comment@a54c31d7fa095754bfef525c0c8e5e5674c4b4b1 # v2
         id: find-comment
         id: find-comment
         with:
         with:
           issue-number: ${{ fromJSON(steps.download-artifact.outputs.result).pr }}
           issue-number: ${{ fromJSON(steps.download-artifact.outputs.result).pr }}
           comment-author: 'github-actions[bot]'
           comment-author: 'github-actions[bot]'
           body-includes: Bundle size
           body-includes: Bundle size
       - name: Comment on PR
       - name: Comment on PR
-        uses: peter-evans/create-or-update-comment@v3
+        uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
         with:
         with:
           issue-number: ${{ fromJSON(steps.download-artifact.outputs.result).pr }}
           issue-number: ${{ fromJSON(steps.download-artifact.outputs.result).pr }}
           comment-id: ${{ steps.find-comment.outputs.comment-id }}
           comment-id: ${{ steps.find-comment.outputs.comment-id }}