ci: Use token-exchange action for workflow tokens#4029
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4029 +/- ##
=======================================
Coverage ? 98.58%
=======================================
Files ? 425
Lines ? 12364
Branches ? 1948
=======================================
Hits ? 12189
Misses ? 175
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Replace the `PULL_REQUEST_UPDATE_TOKEN` and `PUBLISH_PAGES_TOKEN` secrets with scoped tokens fetched via the `MetaMask/github-tools/get-token` action, so each job only receives the permissions it actually needs.
`publish-github-pages.yml` no longer declares `PUBLISH_PAGES_TOKEN`, so callers must stop passing it as a secret. Remove it from `publish-release.yml` (both its `workflow_call.secrets` and the five calls into `publish-github-pages.yml`) and from `main.yml`'s call to `publish-release.yml`.
`publish-github-pages.yml` no longer declares the secret, so passing it from `publish-main-docs.yml` fails actionlint.
56c32f6 to
bdf6d3d
Compare
cryptodev-2s
approved these changes
Jun 12, 2026
FrederikBolding
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the Patroll-based
PULL_REQUEST_UPDATE_TOKENandPUBLISH_PAGES_TOKENsecrets with tokens fetched via theMetaMask/github-tools/get-tokenaction. Patroll has proven unreliable, so this moves these workflows over to the token-exchange service instead.Note
Medium Risk
Changes how write-capable tokens are issued for gh-pages deploys and bot commits to PR branches; failures depend on TOKEN_EXCHANGE_URL and environment protection being configured correctly.
Overview
Replaces Patroll-backed repo secrets
PULL_REQUEST_UPDATE_TOKENandPUBLISH_PAGES_TOKENwith short-lived tokens fromMetaMask/github-tools/.github/actions/get-token@v1, usingvars.TOKEN_EXCHANGE_URLand scoped GitHub permissions.GitHub Pages (
publish-github-pages.yml): removes the reusable workflow’sPUBLISH_PAGES_TOKENsecret input; the publish job fetches a token withcontents: writeand passes it topeaceiris/actions-gh-pages. Callers inmain.yml,publish-main-docs.yml, andpublish-release.ymlno longer forward that secret.PR automation (
update-pull-request.yml): drops thePULL_REQUEST_UPDATE_TOKENworkflow_call secret; each job that needs API/git access runsget-tokenfirst (read vs write scopes per job) and usessteps.get-token.outputs.tokenforgh, checkout, and push.main.ymlstops passingPULL_REQUEST_UPDATE_TOKENinto the Dependabot update job.Reviewed by Cursor Bugbot for commit bdf6d3d. Bugbot is set up for automated code reviews on this repo. Configure here.