feat(ci): auto-dispatch homelab deploy after image push
build-and-push / build-and-push (push) Successful in 17s
build-and-push / build-and-push (push) Successful in 17s
This commit is contained in:
@@ -39,4 +39,17 @@ jobs:
|
||||
tags: |
|
||||
${{ env.IMAGE }}:latest
|
||||
${{ 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"}'
|
||||
|
||||
Reference in New Issue
Block a user