Skip to content

ci: push the generated package with the energy-models-bot app token - #5

Open
coroa wants to merge 1 commit into
mainfrom
ci/bot-app-token-copier
Open

coroa wants to merge 1 commit into
mainfrom
ci/bot-app-token-copier

Conversation

@coroa

@coroa coroa commented Nov 9, 2026 •

Copy link
Copy Markdown

I have needed to create another PAT for the renovate workflow in datarecord and decided doing this through a new Github App Bot would be the easiest way to do it.

Ai-noise:

The `test-generated-package-ci` job pushed the generated package to a `ci/*` branch with `CI_PAT`, a person's long-lived fine-grained token.
`GITHUB_TOKEN` cannot do this push: it may not write files under `.github/workflows/`, and its pushes start no workflow.
This PR mints a token from the `energy-models-bot` org app instead, with `contents: write` and `workflows: write`, scoped to this repository and revoked when the job ends.
The cleanup step reuses the same token to delete the branch.

This needs `workflows: write` added to the app and accepted on its installations; without it the push is rejected and this PR's own CI fails.
Together with #4, this removes the last use of `CI_PAT`, so the secret can be deleted once both are merged.

@coroa
coroa requested a review from brynpickering as a code owner November 9, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant