From 564c860febd61668475e9895dad0cff61bc5a58b Mon Sep 17 00:00:00 2001 From: Julian Koehn Date: Thu, 15 Oct 2026 10:38:47 +0200 Subject: [PATCH 1/2] ci: run release-please with the velcure-release app token Pull requests opened with GITHUB_TOKEN start no workflows, so the release pull request never received the required checks. --- .github/workflows/release-please.yml | 16 ++++++++++++--- docs/repo-settings.md | 30 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 5e62826..44c19ce 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -9,16 +9,26 @@ permissions: {} jobs: release-please: runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write + permissions: {} outputs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: + # Pull requests opened with GITHUB_TOKEN start no workflows, so the + # release pull request would carry no required checks. The token of the + # velcure-release GitHub App does start them. + - id: app-token + uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 + with: + client-id: ${{ vars.RELEASE_APP_CLIENT_ID }} + private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} + permission-contents: write + permission-pull-requests: write + permission-issues: write - id: release uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 with: + token: ${{ steps.app-token.outputs.token }} config-file: release-please-config.json manifest-file: .release-please-manifest.json diff --git a/docs/repo-settings.md b/docs/repo-settings.md index 1e3fce3..49fe8fb 100644 --- a/docs/repo-settings.md +++ b/docs/repo-settings.md @@ -115,6 +115,36 @@ with `ruleset.json`: `integration_id` 15368 is the GitHub Actions app. +## Release app + +release-please runs with the token of the GitHub App `velcure-release`, not +with `GITHUB_TOKEN`: a pull request opened with `GITHUB_TOKEN` starts no +workflows, so the release pull request would never get the required checks. + +| Setting | Value | +|---|---| +| Owner | organization `velcure` | +| Webhook | off | +| Repository permissions | Contents: read and write, Pull requests: read and write, Issues: read and write, Metadata: read | +| Organization and account permissions | none | +| Installation | only on `velcure/esdscom` | +| Where it can be installed | only on this account | + +The workflow reads two settings of the repository: + +| Name | Kind | Value | +|---|---|---| +| `RELEASE_APP_CLIENT_ID` | Actions variable | the app's client ID | +| `RELEASE_APP_PRIVATE_KEY` | Actions secret | a private key of the app (PEM) | + +```sh +gh variable set RELEASE_APP_CLIENT_ID --repo velcure/esdscom --body "" +gh secret set RELEASE_APP_PRIVATE_KEY --repo velcure/esdscom < velcure-release.private-key.pem +``` + +The token `actions/create-github-app-token` creates is limited to the three +permissions the job names and expires after one hour. + ## Workflows that depend on visibility | Workflow | Behaviour | From 763f2ca2b3014d7411e6099a157efc73e83063b7 Mon Sep 17 00:00:00 2001 From: Julian Koehn Date: Thu, 15 Oct 2026 10:42:02 +0200 Subject: [PATCH 2/2] docs: keep the release app settings at the organization --- docs/repo-settings.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/repo-settings.md b/docs/repo-settings.md index 49fe8fb..814ca4a 100644 --- a/docs/repo-settings.md +++ b/docs/repo-settings.md @@ -130,7 +130,8 @@ workflows, so the release pull request would never get the required checks. | Installation | only on `velcure/esdscom` | | Where it can be installed | only on this account | -The workflow reads two settings of the repository: +The workflow reads two settings of the organization `velcure`, visible to +the selected repositories only: | Name | Kind | Value | |---|---|---| @@ -138,10 +139,13 @@ The workflow reads two settings of the repository: | `RELEASE_APP_PRIVATE_KEY` | Actions secret | a private key of the app (PEM) | ```sh -gh variable set RELEASE_APP_CLIENT_ID --repo velcure/esdscom --body "" -gh secret set RELEASE_APP_PRIVATE_KEY --repo velcure/esdscom < velcure-release.private-key.pem +gh variable set RELEASE_APP_CLIENT_ID --org velcure --visibility selected --repos esdscom --body "" +gh secret set RELEASE_APP_PRIVATE_KEY --org velcure --visibility selected --repos esdscom < velcure-release.private-key.pem ``` +Another repository that releases with the app is added to both lists +(`--repos esdscom,`) and to the app's installation. + The token `actions/create-github-app-token` creates is limited to the three permissions the job names and expires after one hour.