Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
34 changes: 34 additions & 0 deletions docs/repo-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,40 @@ 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 organization `velcure`, visible to
the selected repositories only:

| 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 --org velcure --visibility selected --repos esdscom --body "<client ID>"
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,<repo>`) 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.

## Workflows that depend on visibility

| Workflow | Behaviour |
Expand Down
Loading