ci: use dedicated release App token to publish releases (backport 2.34) [ESR] by jdomeracki-coder · Pull Request #28590 · coder/coder · GitHub
Skip to content

ci: use dedicated release App token to publish releases (backport 2.34) [ESR] - #28590

Merged
mtojek merged 1 commit into
release/2.34from
backport/release-2.34/release-app-token
Aug 25, 2026
Merged

ci: use dedicated release App token to publish releases (backport 2.34) [ESR]#28590
mtojek merged 1 commit into
release/2.34from
backport/release-2.34/release-app-token

Conversation

@jdomeracki-coder

Copy link
Copy Markdown
Contributor

Backport of #28553 to release/2.34.

Use a dedicated GitHub App token (secrets.RELEASE_APP_ID / secrets.RELEASE_APP_PRIVATE_KEY) for the Publish release step instead of the default GITHUB_TOKEN.

gh release create targets a release-branch commit that modifies files under .github/workflows/ relative to the default branch. The create-release API requires the authenticating token to be authorized to modify workflows; the default GITHUB_TOKEN is not, so it fails with HTTP 403: Resource not accessible by integration. The coder-release-publisher App token has code + workflows write.

Requires RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY to be configured (already set on coder/coder).

Refs coder/security-automation#297.

## Problem

The `Publish release` step fails with `HTTP 403: Resource not accessible
by integration` because the default `GITHUB_TOKEN` cannot create the
release tag under the active tag-create protection ruleset.

## Change

Use a dedicated GitHub App token for the `Publish release` step:

- Add a `Generate release App token` step using `secrets.RELEASE_APP_ID`
/ `secrets.RELEASE_APP_PRIVATE_KEY`.
- Switch only that step's `GITHUB_TOKEN` to the minted App token.

## Required before merge (admin)

1. Create the release GitHub App (least privilege) and install it on
`coder/coder`.
2. Configure `RELEASE_APP_ID` / `RELEASE_APP_PRIVATE_KEY`.
3. Add the App to the tag-create protection ruleset bypass list.

Refs coder/security-automation#297.
@github-actions

Copy link
Copy Markdown
Contributor

@mtojek
mtojek self-requested a review August 25, 2026 18:18
@mtojek
mtojek merged commit 904d4a7 into release/2.34 Aug 25, 2026
46 of 48 checks passed
@mtojek
mtojek deleted the backport/release-2.34/release-app-token branch August 25, 2026 18:18
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants