discourse-release: announce published releases on the community forum

A composite action: reads the release from the event file with jq, looks up
the repo's Announcements category (release-map.json) and posts as
release-bot. One topic per repo+tag via the topic external_id, so a re-run
is a no-op. Optional Discord webhook.
This commit is contained in:
jcoffey-dev committed 2026-09-26 16:33:53 -07:00
1 parent fab0c4d45e
commit 6245815b09
4 files changed
+142

No files matched your search

+29
View File
@@ -18,3 +18,32 @@ Pin every use by full commit SHA.
Works in any job image with a POSIX shell. Installs git with apk or apt-get
if the image has none, and clones from the runner's internal Gitea address
(`CI_SERVER_INTERNAL`) so CI traffic never crosses Cloudflare.
## discourse-release
Announces a published release on the community forum, in the repo's
Announcements category. Add to a project repo as `.gitea/workflows/announce.yml`:
```yaml
on:
release:
types: [published]
jobs:
announce:
runs-on: light
steps:
- uses: coffey-labs/actions/discourse-release@<sha>
with:
api-key: ${{ secrets.DISCOURSE_RELEASE_KEY }}
discord-webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK }} # optional
```
- The repo must be listed in `discourse-release/release-map.json`, the one
place that maps repos to forum categories.
- `DISCOURSE_RELEASE_KEY` is an org-level secret (coffey-labs and inbuxa)
holding release-bot's key, which can only create posts.
- Re-running is safe: each repo+tag gets one topic, enforced by the forum.
- Release notes are passed to the forum through `jq` only, so quotes,
backticks and multi-line Markdown arrive exactly as written.
- To turn it off for a repo, delete its `announce.yml`; for everyone, remove
the org secret.