feat(release): authenticate release-please via GitHub App - #181
Conversation
Replace the TAYLORBOT_GITHUB_ACTION PAT with a token minted by actions/create-github-app-token using RELEASE_PLEASE_APP_ID and RELEASE_PLEASE_PRIVATE_KEY org secrets. App tokens trigger downstream workflows on release PRs and remove the dependency on the taylorbot user account.
|
Bear in mind that APP_ID and CLIENT_ID are not the same for this action. We had to update the secret for some other actions recently because of this. |
|
Are you sure about the release please name for the app id and client id? Maybe autoapprove or smth else might fit better? |
The secret stores the numeric App ID, not the Client ID. Switch the create-github-app-token input from client-id to app-id so the value and the parameter match.
Good catch! I just changed it to use only the APP_ID. PTAL.
But we will use this same App for creating the release PRs, right? |
GitHub now recommends client-id over the deprecated app-id input. Matches the convention used by other workflows in this repo (fix-vulnerabilities.yaml, dispatch-update-chart-*.yaml). The RELEASE_PLEASE_APP_ID org secret must now hold the App's Client ID (e.g. Iv23li...) instead of the numeric App ID.
The secret holds the App's Client ID (not the numeric App ID), so the name should reflect that. Pairs cleanly with the client-id: input on create-github-app-token.
|
@fiunchinho I think this is really good but we might be missing the auto-release flag that was reverted here 6aad5af? |
I'd say let's tackle the auto merge in a different PR |
Summary
release.yamlreusable workflow (release-please wrapper) from a long-lived PAT (TAYLORBOT_GITHUB_ACTION) to a short-lived GitHub App installation token minted byactions/create-github-app-token.RELEASE_PLEASE_CLIENT_IDandRELEASE_PLEASE_PRIVATE_KEY(org-level secrets, available to all repositories).Why
GITHUB_TOKENdoes not. This means CI runs on the release PR like any normal PR.taylorbotuser account and its PAT lifecycle.contents: write,pull_requests: write).Breaking change for callers
Repos that call this reusable workflow must update the
secrets:they pass:The new required secrets are
RELEASE_PLEASE_CLIENT_IDandRELEASE_PLEASE_PRIVATE_KEY, both provisioned at the organization level with access to all repositories.Notes on conventions
actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0, matching the pin used by other workflows in this repo (fix-vulnerabilities.yaml,dispatch-update-chart-*.yaml).client-id:input parameter oncreate-github-app-token. GitHub now recommendsclient-idover the deprecatedapp-idinput.RELEASE_PLEASE_CLIENT_IDto match the value it actually holds (the App's Client ID, e.g.Iv23li...). This is more explicit than theHERALD_APP_ID/client-id:pairing used byfix-vulnerabilities.yamland the dispatch workflows in this repo — we may want to align those in a follow-up, but they're left untouched here.Test plan
secrets: inherit(or to pass the two new secrets explicitly). Push a conventional commit tomainand confirm:taylorbot).GITHUB_TOKEN).release.yamland coordinate their migration.