Repository navigation
ci(agent-bff): tell forestadmin-server when a stable image ships - #1916
Merged
Merged
Conversation
The publish workflow ends at the registry, so the deploy on the server side can only ever be started by hand. The executor does not stop there — it dispatches into forestadmin-server, which deploys production on the event. Do the same for the BFF, so a release reaches production the same way. Gate it on is_latest, which the merge job already decides against the release tags as they stand when the manifest is written: the same reading that decides whether :latest moves. A prerelease, or a rebuild of a version that is no longer the newest stable, must not deploy over production. That value lived only inside the job, so expose it as a job output. GITHUB_TOKEN cannot dispatch into another repository, hence the dedicated token, and an unset one fails the job rather than passing quietly — a release that silently stops short of deploying is the failure worth catching here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
PMerlet
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The BFF's publish workflow ends at the registry. The deploy on the server side can therefore only be
started by hand, which is not how the workflow-executor works: it dispatches into
forestadmin-server, whosedeploy-workflow-executor.ymldeploys production on the event.This adds the same last step for the BFF, so a release reaches production the same way.
What it does
A
notify-serverjob aftermergesends arepository_dispatchtoForestAdmin/forestadmin-server:{ "event_type": "agent-bff-published", "client_payload": { "version": "1.33.0" } }Gating
On
is_latest, which themergejob already decides against the release tags as they stand when themanifest is written — the same reading that decides whether
:latestmoves. A prerelease, or arebuild of a version that is no longer the newest stable, must not deploy over production.
That value only existed inside the job, unlike the executor's workflow where it is an
extract-versionoutput, so this exposes it as amergejob output rather than recomputing it.Notes
GITHUB_TOKENcannot dispatch into another repository, so this usesSERVER_DEPLOY_DISPATCH_TOKEN— the same secret the executor's job uses, a fine-grained PAT or GitHub App with Contents:write on
forestadmin-server. It is already configured for the executor.with nothing to show for it, is exactly the failure worth catching.
Paired with
ForestAdmin/forestadmin-server#8514, which adds the receiving
deploy-agent-bff.yml. Until both aremerged, the BFF deploy stays manual — this PR alone dispatches an event nothing listens to yet, which
is harmless.
🤖 Generated with Claude Code
Note
Add
notify-serverjob todocker-publish-bffworkflow for stable releasesmergejob now exposes anis_latestoutput derived from the existingrecheckstep, so downstream jobs know whether the published manifest is the latest stable release.notify-serverjob runs on non-PR workflows whenis_latestistrue, validates thatSERVER_DEPLOY_DISPATCH_TOKENis present, and POSTs arepository_dispatchevent (agent-bff-published) toForestAdmin/forestadmin-serverwith the full version inclient_payload.version.notify-serverfails the workflow ifSERVER_DEPLOY_DISPATCH_TOKENis missing or the GitHub API dispatch request fails.Macroscope summarized 5057646.