Skip to content

Commit 3aa517c

Browse files
committed
Update all GitHub Actions to latest versions and enable Dependabot
1 parent b58a9d1 commit 3aa517c

File tree

9 files changed

+98
-104
lines changed

9 files changed

+98
-104
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ updates:
1616
target-branch: 'main'
1717
versioning-strategy: 'increase'
1818
open-pull-requests-limit: 10
19+
20+
- package-ecosystem: 'github-actions'
21+
directory: '/'
22+
schedule:
23+
interval: 'daily'
24+
time: '06:00'
25+
allow:
26+
- dependency-name: 'MetaMask/*'
27+
- dependency-name: 'actions/*'
28+
target-branch: 'main'
29+
open-pull-requests-limit: 10

.github/workflows/build-lint-test.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
node-version: [20.x, 22.x]
2121
steps:
2222
- name: Checkout and setup environment
23-
uses: MetaMask/action-checkout-and-setup@v1
23+
uses: MetaMask/action-checkout-and-setup@v2
2424
with:
2525
is-high-risk-environment: false
2626
node-version: ${{ matrix.node-version }}
@@ -29,7 +29,7 @@ jobs:
2929
run: yarn workspace @metamask/snaps-execution-environments run build:lavamoat:test
3030
- name: Save "@metamask/snaps-execution-environments" build
3131
id: cache-snaps-execution-environments-build
32-
uses: actions/upload-artifact@v4
32+
uses: actions/upload-artifact@v6
3333
with:
3434
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
3535
retention-days: 1
@@ -52,13 +52,13 @@ jobs:
5252
needs: prepare
5353
steps:
5454
- name: Checkout and setup environment
55-
uses: MetaMask/action-checkout-and-setup@v1
55+
uses: MetaMask/action-checkout-and-setup@v2
5656
with:
5757
is-high-risk-environment: false
5858
- name: Build
5959
run: yarn build:ci
6060
- name: Save build files
61-
uses: actions/upload-artifact@v4
61+
uses: actions/upload-artifact@v6
6262
with:
6363
name: build-source-${{ runner.os }}-${{ github.sha }}
6464
retention-days: 1
@@ -79,7 +79,7 @@ jobs:
7979
needs: prepare
8080
steps:
8181
- name: Checkout and setup environment
82-
uses: MetaMask/action-checkout-and-setup@v1
82+
uses: MetaMask/action-checkout-and-setup@v2
8383
with:
8484
is-high-risk-environment: false
8585
- name: Build
@@ -98,11 +98,11 @@ jobs:
9898
needs: build
9999
steps:
100100
- name: Checkout and setup environment
101-
uses: MetaMask/action-checkout-and-setup@v1
101+
uses: MetaMask/action-checkout-and-setup@v2
102102
with:
103103
is-high-risk-environment: false
104104
- name: Restore build files
105-
uses: actions/download-artifact@v4
105+
uses: actions/download-artifact@v7
106106
with:
107107
name: build-source-${{ runner.os }}-${{ github.sha }}
108108
- name: Generate LavaMoat policy
@@ -121,7 +121,7 @@ jobs:
121121
needs: prepare
122122
steps:
123123
- name: Checkout and setup environment
124-
uses: MetaMask/action-checkout-and-setup@v1
124+
uses: MetaMask/action-checkout-and-setup@v2
125125
with:
126126
is-high-risk-environment: false
127127
- name: Lint
@@ -149,16 +149,16 @@ jobs:
149149
package-name: ${{ fromJson(needs.prepare.outputs.test-workspace-package-names) }}
150150
steps:
151151
- name: Checkout and setup environment
152-
uses: MetaMask/action-checkout-and-setup@v1
152+
uses: MetaMask/action-checkout-and-setup@v2
153153
with:
154154
is-high-risk-environment: false
155155
node-version: ${{ matrix.node-version }}
156156
- name: Restore "@metamask/snaps-execution-environments" build
157-
uses: actions/download-artifact@v4
157+
uses: actions/download-artifact@v7
158158
with:
159159
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
160160
- name: Restore build files
161-
uses: actions/download-artifact@v4
161+
uses: actions/download-artifact@v7
162162
with:
163163
name: build-source-${{ runner.os }}-${{ github.sha }}
164164
- name: Install browsers
@@ -183,7 +183,7 @@ jobs:
183183
shell: bash
184184
- name: Upload coverage artifact
185185
if: ${{ matrix.node-version == '22.x' }}
186-
uses: actions/upload-artifact@v4
186+
uses: actions/upload-artifact@v6
187187
with:
188188
name: coverage-${{ steps.get-coverage-folder.outputs.artifact-name }}
189189
path: |
@@ -204,9 +204,9 @@ jobs:
204204
runs-on: ubuntu-latest
205205
needs: test
206206
steps:
207-
- uses: actions/checkout@v4
207+
- uses: actions/checkout@v6
208208
- name: Download coverage artifact
209-
uses: actions/download-artifact@v4
209+
uses: actions/download-artifact@v7
210210
with:
211211
pattern: coverage-*
212212
merge-multiple: true
@@ -229,16 +229,16 @@ jobs:
229229
package-name: ${{ fromJson(needs.prepare.outputs.e2e-workspace-package-names) }}
230230
steps:
231231
- name: Checkout and setup environment
232-
uses: MetaMask/action-checkout-and-setup@v1
232+
uses: MetaMask/action-checkout-and-setup@v2
233233
with:
234234
is-high-risk-environment: false
235235
node-version: ${{ matrix.node-version }}
236236
- name: Restore "@metamask/snaps-execution-environments" build
237-
uses: actions/download-artifact@v4
237+
uses: actions/download-artifact@v7
238238
with:
239239
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
240240
- name: Restore build files
241-
uses: actions/download-artifact@v4
241+
uses: actions/download-artifact@v7
242242
with:
243243
name: build-source-${{ runner.os }}-${{ github.sha }}
244244
- name: Build snap
@@ -264,7 +264,7 @@ jobs:
264264
os: [macOS-latest, windows-latest]
265265
steps:
266266
- name: Checkout and setup environment
267-
uses: MetaMask/action-checkout-and-setup@v1
267+
uses: MetaMask/action-checkout-and-setup@v2
268268
with:
269269
is-high-risk-environment: false
270270
platform-specific-caching: true

.github/workflows/main.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
name: Check workflows
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- name: Checkout repository
20+
uses: actions/checkout@v6
2021
- name: Download actionlint
2122
id: download-actionlint
2223
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.7.7
@@ -26,16 +27,38 @@ jobs:
2627
shell: bash
2728

2829
analyse-code:
29-
name: Code scanner
30+
name: Analyse code
3031
needs: check-workflows
31-
uses: ./.github/workflows/security-code-scanner.yml
32+
uses: MetaMask/action-security-code-scanner/.github/workflows/security-scan.yml@v2
33+
with:
34+
scanner-ref: v2
35+
paths-ignored: |
36+
.storybook/
37+
**/__snapshots__/
38+
**/*.snap
39+
**/*.stories.js
40+
**/*.stories.tsx
41+
**/*.test.browser.ts*
42+
**/*.test.js*
43+
**/*.test.ts*
44+
**/fixtures/
45+
**/jest.config.js
46+
**/jest.environment.js
47+
**/mocks/
48+
**/test*/
49+
docs/
50+
e2e/
51+
merged-packages/
52+
node_modules/
53+
storybook/
54+
test*/
55+
secrets:
56+
project-metrics-token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
57+
slack-webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}
3258
permissions:
3359
actions: read
3460
contents: read
3561
security-events: write
36-
secrets:
37-
SECURITY_SCAN_METRICS_TOKEN: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
38-
APPSEC_BOT_SLACK_WEBHOOK: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}
3962

4063
update-pull-request:
4164
name: Update pull request

.github/workflows/publish-environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
if: ${{ inputs.destination_dir == '' }}
2121
run: exit 1
2222
- name: Checkout and setup environment
23-
uses: MetaMask/action-checkout-and-setup@v1
23+
uses: MetaMask/action-checkout-and-setup@v2
2424
with:
2525
is-high-risk-environment: true
2626
- name: Build dependencies

.github/workflows/publish-github-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
if: ${{ inputs.publish_dir == '' }}
3535
run: exit 1
3636
- name: Checkout and setup environment
37-
uses: MetaMask/action-checkout-and-setup@v1
37+
uses: MetaMask/action-checkout-and-setup@v2
3838
with:
3939
is-high-risk-environment: true
4040
- name: Run build script

.github/workflows/publish-preview.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
outputs:
1313
IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
- name: Determine whether this PR is from a fork
1717
id: is-fork
1818
run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
@@ -29,14 +29,14 @@ jobs:
2929
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v4
32+
- uses: actions/checkout@v6
3333
- name: Checkout pull request
3434
run: gh pr checkout "${PR_NUMBER}"
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
PR_NUMBER: ${{ github.event.issue.number }}
3838
- name: Checkout and setup environment
39-
uses: MetaMask/action-checkout-and-setup@v1
39+
uses: MetaMask/action-checkout-and-setup@v2
4040
with:
4141
is-high-risk-environment: true
4242
- name: Get commit SHA

.github/workflows/publish-release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
tag: ${{ steps.get-release-tag.outputs.tag }}
3535
steps:
3636
- name: Checkout and setup environment
37-
uses: MetaMask/action-checkout-and-setup@v1
37+
uses: MetaMask/action-checkout-and-setup@v2
3838
with:
3939
is-high-risk-environment: true
4040
ref: ${{ github.sha }}
@@ -51,7 +51,7 @@ jobs:
5151
runs-on: ubuntu-latest
5252
steps:
5353
- name: Checkout and setup environment
54-
uses: MetaMask/action-checkout-and-setup@v1
54+
uses: MetaMask/action-checkout-and-setup@v2
5555
with:
5656
is-high-risk-environment: true
5757
ref: ${{ github.sha }}
@@ -69,7 +69,7 @@ jobs:
6969
- name: Build test-snaps
7070
run: yarn workspace @metamask/test-snaps build
7171
- name: Upload build artifacts
72-
uses: actions/upload-artifact@v4
72+
uses: actions/upload-artifact@v6
7373
with:
7474
name: publish-release-artifacts-${{ github.sha }}
7575
include-hidden-files: true
@@ -84,12 +84,12 @@ jobs:
8484
needs: publish-release
8585
steps:
8686
- name: Checkout and setup environment
87-
uses: MetaMask/action-checkout-and-setup@v1
87+
uses: MetaMask/action-checkout-and-setup@v2
8888
with:
8989
is-high-risk-environment: true
9090
ref: ${{ github.sha }}
9191
- name: Restore build artifacts
92-
uses: actions/download-artifact@v4
92+
uses: actions/download-artifact@v7
9393
with:
9494
name: publish-release-artifacts-${{ github.sha }}
9595
- name: Dry run publish to NPM
@@ -108,12 +108,12 @@ jobs:
108108
- get-release-tag
109109
steps:
110110
- name: Checkout and setup environment
111-
uses: MetaMask/action-checkout-and-setup@v1
111+
uses: MetaMask/action-checkout-and-setup@v2
112112
with:
113113
is-high-risk-environment: true
114114
ref: ${{ github.sha }}
115115
- name: Restore build artifacts
116-
uses: actions/download-artifact@v4
116+
uses: actions/download-artifact@v7
117117
with:
118118
name: publish-release-artifacts-${{ github.sha }}
119119
- name: Publish ${{ needs.get-release-tag.outputs.tag }} to NPM
@@ -130,7 +130,7 @@ jobs:
130130
IS_ENVIRONMENT_RELEASE: ${{ steps.is-environment-release.outputs.IS_ENVIRONMENT_RELEASE }}
131131
steps:
132132
- name: Checkout and setup environment
133-
uses: MetaMask/action-checkout-and-setup@v1
133+
uses: MetaMask/action-checkout-and-setup@v2
134134
with:
135135
is-high-risk-environment: true
136136
ref: ${{ github.sha }}
@@ -152,7 +152,7 @@ jobs:
152152
version: ${{ steps.version.outputs.VERSION }}
153153
steps:
154154
- name: Checkout and setup environment
155-
uses: MetaMask/action-checkout-and-setup@v1
155+
uses: MetaMask/action-checkout-and-setup@v2
156156
with:
157157
is-high-risk-environment: true
158158
ref: ${{ github.sha }}
@@ -219,7 +219,7 @@ jobs:
219219
TEST_SNAPS_VERSION: ${{ steps.set-output.outputs.TEST_SNAPS_VERSION }}
220220
steps:
221221
- name: Checkout and setup environment
222-
uses: MetaMask/action-checkout-and-setup@v1
222+
uses: MetaMask/action-checkout-and-setup@v2
223223
with:
224224
is-high-risk-environment: true
225225
ref: ${{ github.sha }}

.github/workflows/security-code-scanner.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)