Skip to content

ci: open autoupdate PRs with the energy-models-bot app token - #4

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

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

Conversation

@coroa

@coroa coroa commented Nov 9, 2026 •

Copy link
Copy Markdown

I 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 autoupdate workflow opened its pull requests with `CI_PAT`, a person's long-lived fine-grained token, because a pull request opened with `GITHUB_TOKEN` starts no workflow.
This PR switches `peter-evans/create-pull-request` to a token from the `energy-models-bot` org app, minted by `actions/create-github-app-token` and valid for one hour.
The pull requests still start CI, but under a bot identity.

The token step reads the org variable `BOT_CLIENT_ID` and the org secret `BOT_PRIVATE_KEY`, and requests only `contents: write` and `pull-requests: write`.
No `workflows` permission is needed, because `scripts/update_actions.py` edits only `template/.github/workflows/`, not this repository's own workflows.
The "Update" step and the failure issue keep using `github.token`.

`ci-copier.yml` still pushes with `CI_PAT` and is out of scope here.

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