ci: authenticate upgrade workflow via GitHub App token#644
Merged
Conversation
The personal access token in API_PLATFORM_DEMO_PR_TOKEN expired and broke the Create Pull Request step. Mint a short-lived token from the existing "API Platform release manager" GitHub App instead, so it is rotated on every run and no longer tied to a personal account. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problème
Le workflow
Upgrade API Platformplante à l'étapeCreate Pull Request(run 26624418740) :Le secret
API_PLATFORM_DEMO_PR_TOKEN(un PAT perso, posé en 2024-10) n'est plus accepté par GitHub : il fonctionnait encore le 22/05 (PR #641 créée par le workflow) et était rejeté le 29/05. Un remplacement par un fine-grained PAT bute sur l'approbation org (Resource not accessible by personal access token).Correctif
Génère un token éphémère depuis la GitHub App API Platform release manager (déjà utilisée pour déclencher ce workflow, et qui a
contents: write+pull_requests: writesurdemo) viaactions/create-github-app-token, au lieu du PAT.Avantages : token regénéré et valable 1h à chaque run (plus d'expiration silencieuse), non lié à un compte perso, pas d'approbation de PAT côté org.
Prérequis avant merge / run
RELEASE_MANAGER_APP_PRIVATE_KEY.API_PLATFORM_DEMO_PR_TOKENpeut ensuite être supprimé.L'App ID
1484548est public, codé en dur dans le workflow.🤖 Generated with Claude Code