Skip to content

ci: push bot commits with a GitHub App token - #17

Merged
riglar merged 1 commit into
mainfrom
ci/push-app-token
Oct 13, 2026
Merged

riglar merged 1 commit into
mainfrom
ci/push-app-token

Conversation

@riglar

@riglar riglar commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Why

The org rulesets now require PRs on protected branches, but this repo was left out: a job here pushes straight to the branch with GITHUB_TOKEN, and GitHub refuses GitHub Actions as a ruleset bypass actor ("must be part of the ruleset source or owner organization").

What changed

  • The pushing job first mints a short-lived token from devicecloud-push-bot (an org app with contents: write only), and pushes with it. That app will be the only bypass actor for bot pushes on this repo.
  • Fallback: while PUSH_APP_ID / PUSH_APP_PRIVATE_KEY are unset it uses GITHUB_TOKEN, as before. Safe to merge first.
  • The bot commit now carries [skip ci] in its message body. App-token pushes start workflows; GITHUB_TOKEN pushes never did. This keeps today's behaviour and avoids loops.

After merge

Once the secrets exist, this repo gets added to the "Require pull requests" ruleset with devicecloud-push-bot as a bypass actor.

🤖 Generated with Claude Code

GitHub does not accept GitHub Actions as a ruleset bypass actor, so a
GITHUB_TOKEN push cannot get past a "require pull request" rule. Mint a
short-lived devicecloud-push-bot token (contents: write only) and push
with it; that app is a bypass actor on this repo's rulesets. Falls back
to GITHUB_TOKEN while PUSH_APP_ID / PUSH_APP_PRIVATE_KEY are unset.

Bot commits now carry the skip-ci marker in their message body:
app-token pushes start workflows, GITHUB_TOKEN pushes never did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@riglar
riglar force-pushed the ci/push-app-token branch from acea4c6 to b7dc744 Compare October 12, 2026 12:49
@riglar
riglar merged commit 22bce27 into main Oct 13, 2026
3 checks passed
@riglar
riglar deleted the ci/push-app-token branch October 13, 2026 07:27
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