feat(ci): auto-dispatch homelab deploy after image push
build-and-push / build-and-push (push) Successful in 17s

This commit is contained in:
2026-07-08 09:54:41 +02:00
parent ed8e9d1ea2
commit 4dbdd936f5
+14 -1
View File
@@ -39,4 +39,17 @@ jobs:
tags: | tags: |
${{ env.IMAGE }}:latest ${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ gitea.sha }} ${{ env.IMAGE }}:${{ gitea.sha }}
provenance: false provenance: false
# Hand off to the homelab stack: dispatch its deploy workflow so the swarm re-resolves
# :latest and rolls the homepage service. Deterministic — no agent involved. TOKEN_DEPLOY
# is the `deploy` bot (write:repository, write collaborator on ffaerber/homelab only).
- name: Trigger homelab deploy
env:
TD: ${{ secrets.TOKEN_DEPLOY }}
run: |
[ -n "$TD" ] || { echo "TOKEN_DEPLOY not set - skipping deploy dispatch"; exit 0; }
curl -sS -o /dev/null -w "homelab deploy dispatch -> HTTP %{http_code}\n" -X POST \
-H "Authorization: token $TD" -H "Content-Type: application/json" \
"${GITHUB_SERVER_URL}/api/v1/repos/ffaerber/homelab/actions/workflows/deploy.yml/dispatches" \
-d '{"ref":"main"}'