Skip to content

ci: authenticate upgrade workflow via GitHub App token#644

Merged
vincentchalamon merged 1 commit into
4.3from
ci/upgrade-app-token
May 29, 2026
Merged

ci: authenticate upgrade workflow via GitHub App token#644
vincentchalamon merged 1 commit into
4.3from
ci/upgrade-app-token

Conversation

@vincentchalamon
Copy link
Copy Markdown
Contributor

Problème

Le workflow Upgrade API Platform plante à l'étape Create Pull Request (run 26624418740) :

fatal: could not read Username for 'https://github.com': No such device or address

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: write sur demo) via actions/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

  • Un owner de l'org génère une clé privée pour l'App et la stocke dans le secret repo RELEASE_MANAGER_APP_PRIVATE_KEY.
  • Le secret API_PLATFORM_DEMO_PR_TOKEN peut ensuite être supprimé.

L'App ID 1484548 est public, codé en dur dans le workflow.

🤖 Generated with Claude Code

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>
@vincentchalamon vincentchalamon merged commit 4cd0a7f into 4.3 May 29, 2026
4 checks passed
@vincentchalamon vincentchalamon deleted the ci/upgrade-app-token branch May 29, 2026 09:48
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