@@ -90,17 +90,84 @@ The release workflow can also be started by hand via
9090
9191## Configuration prerequisites
9292
93- These are configured once per repository:
93+ These are configured once per repository. ** If the GitHub App and secrets below
94+ are not set up, the ` release ` job will fail** (e.g. token generation or the push
95+ to ` master ` /` helm-charts ` will be denied).
9496
9597- ** Branch protection rulesets** — see [ ` REPOSITORY_RULESETS_GUIDE.md ` ] ( ./REPOSITORY_RULESETS_GUIDE.md ) .
9698 Status checks ` linting ` and ` test ` must match the job names in ` test.yaml ` .
9799- ** ` release ` environment** — a GitHub Environment named ` release ` with required
98100 reviewers, providing the manual approval gate.
99- - ** GitHub App secrets** — ` HELM_UPDATER_APP_ID ` and ` HELM_UPDATER_PKEY ` for a
100- GitHub App that can bypass branch protection to push the version bump, tag,
101- and downstream updates. The App needs access to ` galaxy-helm ` , ` helm-charts ` ,
102- and ` galaxy-k8s-boot ` .
103- - ** ` K8S_SLACK_WEBHOOK_URL ` ** — Slack incoming webhook for release notifications.
101+ - ** Repository secrets** (Settings → Secrets and variables → Actions):
102+ - ` HELM_UPDATER_APP_ID ` — the GitHub App's ** App ID** (a number).
103+ - ` HELM_UPDATER_PKEY ` — the GitHub App's ** private key** (the full contents of
104+ the downloaded ` .pem ` file, including the ` -----BEGIN/END----- ` lines).
105+ - ` K8S_SLACK_WEBHOOK_URL ` — Slack incoming webhook for release notifications.
106+
107+ ### Creating the release GitHub App
108+
109+ The release workflow uses a GitHub App (rather than the default ` GITHUB_TOKEN ` )
110+ because it must ** bypass branch protection** to push the version-bump commit and
111+ tag to ` master ` , publish to another repository, and trigger a downstream repo.
112+ The default ` GITHUB_TOKEN ` cannot do these things.
113+
114+ 1 . ** Create the App.** Go to the organization's
115+ ** Settings → Developer settings → GitHub Apps → New GitHub App** (an
116+ org-owned App is recommended over a personal one so ownership survives
117+ maintainer changes). Set:
118+ - ** GitHub App name** : e.g. ` galaxy-helm-release-bot ` .
119+ - ** Homepage URL** : the repo URL (any valid URL works).
120+ - ** Webhook** : uncheck ** Active** — this App does not need to receive
121+ webhooks.
122+
123+ 2 . ** Set repository permissions.** Under ** Permissions → Repository permissions** ,
124+ grant the minimum the workflows need:
125+
126+ | Permission | Access | Why |
127+ | ------------------| ----------------| -----|
128+ | ** Contents** | Read and write | Push the version bump + tag to ` master ` , create the GitHub release, push the packaged chart to ` CloudVE/helm-charts ` , and send the ` repository_dispatch ` to ` galaxy-k8s-boot ` |
129+ | ** Pull requests** | Read and write | Approve PRs and enable auto-merge (` auto-approve.yaml ` , ` enable-auto-merge.yaml ` ) |
130+ | ** Issues** | Read and write | Add the comment + reaction when ` /approve ` is used (PR comments are issues) |
131+ | ** Metadata** | Read-only | Mandatory; selected automatically |
132+
133+ Leave everything else as ** No access** .
134+
135+ 3 . ** Create the App** , then ** generate a private key** (App settings → * Private
136+ keys* → ** Generate a private key** ). This downloads a ` .pem ` file — its
137+ contents become the ` HELM_UPDATER_PKEY ` secret. Note the ** App ID** shown at
138+ the top of the App settings page — that becomes ` HELM_UPDATER_APP_ID ` .
139+
140+ 4 . ** Install the App** on the repositories it touches (App settings →
141+ ** Install App** → choose the account → ** Only select repositories** ):
142+ - ` galaxyproject/galaxy-helm `
143+ - ` galaxyproject/galaxy-k8s-boot `
144+ - ` CloudVE/helm-charts `
145+
146+ > ** Cross-organization note:** ` release.yaml ` requests a token for
147+ > ` galaxy-helm,helm-charts,galaxy-k8s-boot ` . ` helm-charts ` lives in the
148+ > ** CloudVE** org while the others are under ** galaxyproject** , so the App
149+ > must be installed in ** both** organizations. A single installation token
150+ > only covers repositories owned by one account, so if a future change can't
151+ > see ` CloudVE/helm-charts ` , confirm the App is installed in the CloudVE org
152+ > and that ` actions/create-github-app-token ` is requesting the right owner.
153+
154+ 5 . ** Add the App to the branch-protection ruleset bypass list** so it can push
155+ to protected ` master ` . See [ ` REPOSITORY_RULESETS_GUIDE.md ` ] ( ./REPOSITORY_RULESETS_GUIDE.md )
156+ — set ` actor_id ` to the App's integration ID (` gh api /app ` after
157+ authenticating as the App, or read it from the ruleset guide's instructions)
158+ and ` actor_type ` to ` Integration ` .
159+
160+ 6 . ** Verify.** Trigger a dry run via ** Actions → Release → Run workflow**
161+ (` workflow_dispatch ` ) with a ` patch ` bump and watch the ` release ` job. If the
162+ App is misconfigured the failure will surface at the * Generate GitHub App
163+ token* step or the first ` git push ` .
164+
165+ ### Notifications
166+
167+ The ` notify ` job sends a ** success** message only when the ` release ` job
168+ succeeds, and a distinct ** failure** message otherwise (including when the
169+ release is skipped because an earlier job failed). A failed or skipped release
170+ will therefore * not* post a "has been released" message.
104171
105172## Workflow reference
106173
0 commit comments