Skip to content

MOBILE-0000: Use a GitHub App token instead of the PAT in release flows - #233

Merged
justSmK merged 1 commit into
developfrom
feature/MOBILE-0000-github-app-token
Oct 28, 2026
Merged

justSmK merged 1 commit into
developfrom
feature/MOBILE-0000-github-app-token

Conversation

@justSmK

@justSmK justSmK commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Release PRs and the master → develop merge-back now use an installation token of the mindbox-mobile-ci GitHub App
instead of PAT_FOR_TRIGGERING_BRANCH_PROTECTION. Each job mints its own token for this repository with only the
permissions its step needs; the key and client ID come from the org secret MOBILE_CI_APP_PRIVATE_KEY and the org
variable MOBILE_CI_APP_CLIENT_ID. Release and merge-back PRs will be authored and merged by mindbox-mobile-ci[bot].
The PAT secret stays until a release passes with the App.

The same steps ran in a sandbox: PR checks start without approval, auto-merge completes after the token is revoked,
the bot's merge starts push workflows, and merges that change workflow files need no Workflows permission.

Release PRs and the master-to-develop merge-back were opened and merged
with PAT_FOR_TRIGGERING_BRANCH_PROTECTION, a personal token of an org
admin account, only because events made with GITHUB_TOKEN start no
workflows. An installation token of the mindbox-mobile-ci App starts
them the same way, covers only this repository and the permissions of
its step, and expires within an hour.

The key comes from the org secret MOBILE_CI_APP_PRIVATE_KEY and the
client ID from the org variable MOBILE_CI_APP_CLIENT_ID. Release and
merge-back PRs are now authored by mindbox-mobile-ci[bot].

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the switch from PAT authentication to job-scoped GitHub App tokens.

No open issues 🎉

What changed in this PR

Replaces PAT authentication in release PR and master-to-develop merge-back flows with per-job installation tokens for the mindbox-mobile-ci GitHub App.

Changes:

  • Creates App tokens with permissions scoped to each job’s needs.
  • Uses App tokens for GitHub CLI PR operations.
  • Passes the App private key through the reusable publishing workflow’s callers.
File Description
.github/​workflows/​publish-reusable.yml Accepts the App private key and uses an App token to create and merge merge-back PRs.
.github/​workflows/​publish-common-trigger.yml Passes the App private key to both reusable publishing calls.
.github/​workflows/​manual-prepare_release_branch.yml Creates an App token for opening release PRs.

Review effort: Balanced

@justSmK
justSmK merged commit 6541c9a into develop Oct 28, 2026
7 checks passed
@justSmK
justSmK deleted the feature/MOBILE-0000-github-app-token branch October 28, 2026 11:55
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