From e410085aedcb3fe4d2fdfa04a02872331ea50790 Mon Sep 17 00:00:00 2001 From: Pierre Merlet Date: Fri, 26 Jun 2026 14:12:43 +0200 Subject: [PATCH] ci(workflow-executor): trigger forestadmin-server prod deploy on stable publish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After publishing the multi-arch manifest, repository_dispatch forestadmin-server (event workflow-executor-published, payload version) so it deploys the new image to the production executor env. Gated on is_latest — only the latest stable version auto-deploys to prod; prereleases and older-version rebuilds never do. Requires a PAT with repo scope on forestadmin-server (FORESTADMIN_SERVER_DISPATCH_TOKEN). Co-Authored-By: Claude Opus 4.8 --- .github/workflows/docker-publish.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index c985469be4..32728f7ba2 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -283,3 +283,19 @@ jobs: - name: Inspect manifest run: docker buildx imagetools inspect ghcr.io/forestadmin/workflow-executor:${{ needs.extract-version.outputs.full }} + + # Notify forestadmin-server to deploy this image to the production executor + # env. Only for the latest stable version — prereleases and rebuilds of older + # versions never auto-deploy to prod. Requires a PAT with repo scope on + # forestadmin-server stored as FORESTADMIN_SERVER_DISPATCH_TOKEN. + - name: Trigger production deploy (forestadmin-server) + if: needs.extract-version.outputs.is_latest == 'true' + env: + DISPATCH_TOKEN: ${{ secrets.FORESTADMIN_SERVER_DISPATCH_TOKEN }} + VERSION: ${{ needs.extract-version.outputs.full }} + run: | + curl -fsS -X POST \ + -H "Authorization: Bearer ${DISPATCH_TOKEN}" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/ForestAdmin/forestadmin-server/dispatches \ + -d "$(printf '{"event_type":"workflow-executor-published","client_payload":{"version":"%s"}}' "$VERSION")"