Skip to content

ci(docs): authenticate documentation workflow via GitHub App token - #974

Open
MaxDall wants to merge 1 commit into
masterfrom
fix-documentation-action
Open

ci(docs): authenticate documentation workflow via GitHub App token#974
MaxDall wants to merge 1 commit into
masterfrom
fix-documentation-action

Conversation

@MaxDall

@MaxDall MaxDall commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The Documentation workflow regenerates docs/supported_publishers.md and commits it back to master. Since master is protected, the default GITHUB_TOKEN cannot push and the run fails with GH006.

This adds an actions/create-github-app-token@v1 step that mints a short-lived token for the fundus-docs-bot GitHub App and passes it to actions/checkout, so the auto-commit step pushes as the App. All other steps are unchanged.

Required before merge

  • Repo secrets DOCS_BOT_APP_ID and DOCS_BOT_PRIVATE_KEY
  • The App added to the master ruleset bypass list (App bypass requires a Ruleset, not classic branch protection)

The App is scoped to Contents: write on this repo only, and the token is minted fresh per run (~1h lifetime).

Verified

A workflow_dispatch run against this branch (run 32954562637) completed successfully: the App token was minted, actions/checkout used it, and git-auto-commit-action pushed the regenerated docs back to the branch. The temporary publisher change used to produce a docs diff, and the resulting bot commit, have both been removed — the PR is now the workflow change only.

Not covered by that test: the run checked out this branch, so the protected-branch bypass on master is exercised for the first time only after merge.

@MaxDall
MaxDall force-pushed the fix-documentation-action branch from a006d51 to b8fa19d Compare August 26, 2026 09:46
@MaxDall
MaxDall requested a review from addie9800 August 26, 2026 09:47

@addie9800 addie9800 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

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.

2 participants