Skip to content

ci: use dedicated release App token to publish releases (backport 2.36) - #28555

Merged
mtojek merged 3 commits into
release/2.36from
backport/release-2.36/release-app-token
Aug 25, 2026
Merged

ci: use dedicated release App token to publish releases (backport 2.36)#28555
mtojek merged 3 commits into
release/2.36from
backport/release-2.36/release-app-token

Conversation

@jdomeracki-coder

Copy link
Copy Markdown
Contributor

Backport of #28553 to release/2.36.

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.

The Publish release step runs gh release create, which creates the
v$version tag in addition to the release. The active tag-create
protection ruleset blocks github-actions[bot] (the default GITHUB_TOKEN),
producing HTTP 403: Resource not accessible by integration.

Mint an installation token from a dedicated release GitHub App
(RELEASE_APP_ID / RELEASE_APP_PRIVATE_KEY) and use it only for the
Publish release step. The App is added to the ruleset bypass list as an
Integration actor.

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

Copy link
Copy Markdown
Contributor

👋 Hey @jdomeracki-coder!

This PR is targeting the release/2.36 release branch, but its title does not start with fix: or fix(scope):.

Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format:

fix: description of the bug fix
fix(scope): description of the bug fix

If this is not a bug fix, it likely should not target a release branch.

The action defaulted to a per-repo installation lookup
(GET /repos/coder/coder/installation), which 404s when the App is
installed at the org level. Set owner/repositories so it resolves the
org installation.
@mtojek
mtojek merged commit 7e0ff4c into release/2.36 Aug 25, 2026
28 checks passed
@mtojek
mtojek deleted the backport/release-2.36/release-app-token branch August 25, 2026 15:35
@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