Skip to content

ci: notify the Home Assistant app repository on every beta and stable release - #1238

Open
HuggeK wants to merge 1 commit into
srcfl:masterfrom
HuggeK:ha-addon-dispatch
Open

HuggeK wants to merge 1 commit into
srcfl:masterfrom
HuggeK:ha-addon-dispatch

Conversation

@HuggeK

@HuggeK HuggeK commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Part of #1233. Companion: srcfl/home-assistant-addons#8 rebuilds the app repository so it can consume these events.

beta.yml and release-assets.yml gain a final job that sends repository_dispatch ftw-release to srcfl/home-assistant-addons once the release and its digest receipt exist. That repository's sync-upstream.yml already listens for this event type; today it only polls hourly, and its build is broken by #1083.

The job uses a new secret, HA_ADDON_DISPATCH_TOKEN. When it is unset the job logs a notice and succeeds, so this can merge before the secret exists and a release is never blocked by the app repository.

Secret setup (owner)
  • A fine-grained personal access token or GitHub App token with Contents: read and write on srcfl/home-assistant-addons only. repository_dispatch needs write access to the target repository, and the job-scoped GITHUB_TOKEN cannot reach another repository.
  • Store it as HA_ADDON_DISPATCH_TOKEN under Settings → Secrets and variables → Actions in srcfl/ftw.
  • It is repository setup, not a release step, like LEGACY_GHCR_TOKEN. AGENTS.md gets one paragraph saying so.
What the app repository does with the event

The payload (channel, tag, commit, plus source_beta for stable) is informational. The receiving sync reads FTW's GitHub releases, downloads ftw-image-digests.json (beta) or ftw-promotion-receipt.json (stable), and checks the Core image digest and OCI labels in the registry before pinning anything. A forged or wrong payload cannot make it publish a different image.

Validation: CI-only change plus a Markdown paragraph, so no changeset (allowlisted). The dispatch has not run end to end because it needs the secret in srcfl/ftw; the call is the documented POST /repos/{owner}/{repo}/dispatches form via gh api, and the receiving repository's tests cover the event type.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Mn3h7AgWsYcNgPGSCBU62

beta.yml and release-assets.yml end by sending repository_dispatch
`ftw-release` to srcfl/home-assistant-addons, whose sync already listens
for it and otherwise polls hourly. The step uses HA_ADDON_DISPATCH_TOKEN
and logs a notice when the secret is absent, so a release is never blocked
by the app repository. AGENTS.md records the secret as repository setup.

Part of srcfl#1233.

Co-authored-by: HuggeK <48095810+HuggeK@users.noreply.github.com>
Claude-Session: https://claude.ai/code/session_014Mn3h7AgWsYcNgPGSCBU62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants