Repository navigation
Conversation
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.
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.