-
-
Notifications
You must be signed in to change notification settings - Fork 261
Update workflows to use MetaMask/action-checkout-and-setup
#5474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a06c737 to
4d31eab
Compare
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you for doing this!
51052a6 to
5d9661d
Compare
## 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 screenshots
…sk/action-checkout-and-setup` instead (#297) This updates all workflows to remove the use of `actions/setup-node`, `actions/cache` and some `actions/checkout` usages. The implementation here is based on: - MetaMask/core#5474
Explanation
This updates all workflows to remove the use of
actions/checkout,actions/setup-node,actions/cache. The implementation here is based on MetaMask/snaps#3214.References
MetaMask-planning#3925.
Changelog
n/a, this doesn't make any changes to packages directly.
Checklist