ci: push ecosystem history from the downstream workflow#61
Conversation
Move the data-branch push out of the upstream ecosystem_ci_per_commit action into each from-commit workflow's new update-history job, which uses the downstream GITHUB_TOKEN (contents: write + actions: read). The consumer dispatch token no longer needs Contents RW.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe ecosystem history update and GitHub Pages publish logic is removed from the upstream 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
prettier -c . (run by the rspack _selftest suite) was failing on pre-existing drift in AGENTS.md and the eco-ci-selfcheck skill doc. Formatting only; no behavior change.
Why
The
data-branch push (the CI history that feeds the website) runs inside the upstreamecosystem_ci_per_commitcomposite action. Because that action runs in the consumer repo, every consumer's dispatch token (e.g. rspack'sREPO_RSTACK_ECO_CI_GITHUB_TOKEN) must carry Contents read/write on this repo just to push that data — broader than it should be.Moving the push into the downstream
*-from-commitworkflow lets it use this repo's ownGITHUB_TOKEN, so the consumer token only needs Actions read/write.dataupdate-historyjobGITHUB_TOKENWhat
Update Ecosystem History+Publish Historysteps (and the checkout/setup-node that only fed them) fromecosystem_ci_per_commit. It now only dispatches, summarizes, and posts the commit comment on failure.update-historyjob to all six*-ecosystem-ci-from-commit.ymlworkflows (needs: [execute-all],if: always() && inputs.suite == '-',permissions: { contents: write, actions: read }). It summarizes the current run viaecosystem-ci-result, builds the payload withupdate-ecosystem-history.mjs, and pushes to thedatabranch withsecrets.GITHUB_TOKEN.AGENTS.md.Observable behavior is unchanged: failure commit comments, website
data, and the from-pr flow all work the same.Rollout (per SHA Pin Update Policy)
This touches
ecosystem_ci_per_commit/**, so after merge: cut a release, bump the SHA pins in the upstream repos, then tighten each consumer token to Actions-RW. Bump the SHA before droppingContentsfrom the token — otherwise the old action's upstream push 403s (the downstream push already succeeded, so only a cosmetic red step). A transient, idempotent double-push todatais expected during the window before consumers bump.Validation
pnpm lint(rslint + prettier) clean; YAML parses for all six workflows and the action.