Commit e5ddf14
authored
chore: Update workflows to use MetaMask/action-checkout-and-setup (#481)
## Description
This updates all workflows to remove the use of `actions/checkout`,
`actions/setup-node`, `actions/cache`. The implementation here is based
on MetaMask/core#5474
Key improvements:
1. Replaces manual Node.js setup and caching with a standardized action
2. Adds proper high-risk environment handling for sensitive workflows
3. Updates Node.js version matrix to include v22.x
4. Improves security by removing potentially vulnerable caching
mechanisms
## Related issues
Fixes: #377
-
https://github.com/MetaMask/metamask-design-system/security/code-scanning/3
-
https://github.com/MetaMask/metamask-design-system/security/code-scanning/2
-
https://github.com/MetaMask/metamask-design-system/security/code-scanning/1
## Manual testing steps
1. Review the changes MetaMask/core#5474 and
make sure it matches in this PR in each workflow:
- `.github/workflows/lint-build-test.yml`
- `.github/workflows/publish-release.yml`
- `.github/workflows/publish-preview.yml`
- `.github/workflows/ensure-blocking-pr-labels-absent.yml`
- `.github/workflows/security-code-scanner.yml`
- `.github/workflows/main.yml`
2. Verify that the workflows use the correct configuration:
```yaml
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
with:
is-high-risk-environment: true # for publish workflows
node-version: ${{ matrix.node-version }} # when using matrix
```
3. Confirm CI passes on this PR with the updated workflows
4. For publish workflows, verify:
- High-risk environment flag is set to `true`
- Artifact handling is properly configured
- Node.js matrix strategy includes all required versions (18.x, 20.x,
22.x)
## Screenshots/Recordings
### After
Comparing code changes between this PR and the one in core
MetaMask/core#5474
https://github.com/user-attachments/assets/dfda14a7-2c90-4f12-bab5-ac78413552c3
## Pre-merge author checklist
- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR
## Pre-merge reviewer checklist
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed)
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots1 parent 5658529 commit e5ddf14
File tree
6 files changed
+99
-159
lines changed- .github/workflows
6 files changed
+99
-159
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
19 | 18 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
29 | 20 | | |
30 | 21 | | |
31 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
19 | 18 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
| 20 | + | |
29 | 21 | | |
30 | 22 | | |
31 | 23 | | |
| |||
38 | 30 | | |
39 | 31 | | |
40 | 32 | | |
41 | | - | |
| 33 | + | |
42 | 34 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 35 | + | |
| 36 | + | |
52 | 37 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 38 | + | |
56 | 39 | | |
57 | 40 | | |
58 | 41 | | |
| |||
68 | 51 | | |
69 | 52 | | |
70 | 53 | | |
71 | | - | |
| 54 | + | |
72 | 55 | | |
73 | 56 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 57 | + | |
| 58 | + | |
83 | 59 | | |
84 | | - | |
85 | | - | |
86 | | - | |
| 60 | + | |
87 | 61 | | |
88 | 62 | | |
89 | 63 | | |
| |||
99 | 73 | | |
100 | 74 | | |
101 | 75 | | |
102 | | - | |
| 76 | + | |
103 | 77 | | |
104 | | - | |
105 | | - | |
106 | | - | |
| 78 | + | |
| 79 | + | |
107 | 80 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 81 | + | |
117 | 82 | | |
118 | 83 | | |
119 | 84 | | |
| |||
129 | 94 | | |
130 | 95 | | |
131 | 96 | | |
132 | | - | |
| 97 | + | |
133 | 98 | | |
134 | 99 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 100 | + | |
| 101 | + | |
144 | 102 | | |
145 | | - | |
146 | | - | |
147 | | - | |
| 103 | + | |
148 | 104 | | |
149 | 105 | | |
150 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | | - | |
| 50 | + | |
39 | 51 | | |
40 | 52 | | |
41 | 53 | | |
| |||
51 | 63 | | |
52 | 64 | | |
53 | 65 | | |
54 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 | | |
56 | 70 | | |
57 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
| |||
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 38 | + | |
| 39 | + | |
48 | 40 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 41 | + | |
52 | 42 | | |
53 | 43 | | |
54 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 20 | + | |
37 | 21 | | |
38 | 22 | | |
39 | 23 | | |
40 | | - | |
41 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
42 | 34 | | |
43 | 35 | | |
| 36 | + | |
44 | 37 | | |
45 | 38 | | |
46 | 39 | | |
47 | | - | |
| 40 | + | |
| 41 | + | |
48 | 42 | | |
| 43 | + | |
49 | 44 | | |
50 | | - | |
51 | | - | |
| 45 | + | |
| 46 | + | |
52 | 47 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 48 | + | |
| 49 | + | |
65 | 50 | | |
66 | 51 | | |
67 | 52 | | |
68 | 53 | | |
69 | | - | |
70 | | - | |
71 | 54 | | |
72 | 55 | | |
| 56 | + | |
73 | 57 | | |
74 | 58 | | |
75 | 59 | | |
76 | 60 | | |
77 | | - | |
| 61 | + | |
| 62 | + | |
78 | 63 | | |
| 64 | + | |
79 | 65 | | |
80 | | - | |
81 | | - | |
| 66 | + | |
| 67 | + | |
82 | 68 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 69 | + | |
| 70 | + | |
94 | 71 | | |
95 | 72 | | |
96 | 73 | | |
97 | | - | |
98 | | - | |
0 commit comments