ci: scope down release/sync-docs to dedicated GitHub Apps#76
Conversation
Replace the over-privileged shared CI bot with two dedicated, minimally scoped GitHub Apps gated behind protected environments. Mirrors the same change in genlayer-testing-suite#78, genlayer-cli#297, and genlayer-js#168. - publish.yml: gate release-and-upload behind the Publish environment, switch from tibdex/github-app-token@v1 (archived) to actions/create-github-app-token@v3 with vars.PUBLISH_CI_APP_CLIENT_ID + secrets.PUBLISH_CI_APP_KEY. - sync-docs.yml: bump create-github-app-token to @V3, switch to client-id, gate behind the Sync-docs environment with vars.DOCS_SYNC_APP_CLIENT_ID + secrets.DOCS_SYNC_APP_KEY. Each App should be installed only on the repos it needs (Publish: this repo only; Sync-docs: this repo + genlayer-docs) with Contents: read & write as the only permission.
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Reduce the attack surface of release & docs-sync workflows by replacing the shared, over-privileged CI bot with two dedicated, minimally scoped GitHub Apps gated behind protected environments. Mirrors the same change in genlayer-testing-suite#78, genlayer-cli#297, and genlayer-js#168.
publish.yml— gaterelease-and-uploadbehind thePublishenvironment, switched from the archivedtibdex/github-app-token@v1to the officialactions/create-github-app-token@v3. Readsvars.PUBLISH_CI_APP_CLIENT_IDandsecrets.PUBLISH_CI_APP_KEY.sync-docs.yml— bumpedactions/create-github-app-tokento@v3, switched to the explicitclient-idparameter, gated behind theSync-docsenvironment. Readsvars.DOCS_SYNC_APP_CLIENT_IDandsecrets.DOCS_SYNC_APP_KEY. Cross-reporepositories: genlayer-docstoken request is preserved.Each App should be installed only on the repos it needs (Publish: this repo only; Sync-docs: this repo +
genlayer-docs) withContents: Read & writeas the only permission.Pre-merge checklist (GitHub side)
Publishenvironment exists withPUBLISH_CI_APP_CLIENT_ID(variable) andPUBLISH_CI_APP_KEY(secret)Sync-docsenvironment exists withDOCS_SYNC_APP_CLIENT_ID(variable) andDOCS_SYNC_APP_KEY(secret)genlayer-py(sync-docs App also ongenlayer-docs) with onlyContents: Read & writePublishApp added to branch-protection bypass list onmain(semantic-release pushes the version-bump commit + tag)Sync-docsenvironment "Deployment branches and tags" allows thev*tag pattern (otherwiserelease: publishedon a tag ref will be blocked)Test plan
fix:orfeat:commit onmainand confirmpublish.ymlmints a token, semantic-release pushes the version bump + tag, the GitHub Release is created, and the PyPI upload succeedssync-docs.ymlfires automatically onrelease: publishedand pushes the API-reference update togenlayer-docsNotes
publish-to-pypijob still readssecrets.PYPI_API_TOKENfrom repo secrets directly (not gated behind an environment). Left as-is to keep this PR scoped, but moving it underPublishwould add the same protection rules to PyPI uploads — happy to do that in a follow-up if desired.