Fix GitOps redeploy race: chain to end of build, not a parallel webhook #7

Merged
william merged 1 commits from fix/chain-portainer-redeploy-after-build into main 2026-08-23 15:12:03 +00:00
Showing only changes of commit 8db8347df0 - Show all commits
+7
View File
@@ -31,3 +31,10 @@ jobs:
IMAGE="${{ vars.REGISTRY_HOST }}/${{ gitea.repository }}/claude-agent:latest"
docker build -t "$IMAGE" ./agent
docker push "$IMAGE"
- name: Trigger Portainer redeploy
# Deliberately NOT a separate Gitea repo webhook firing in parallel on the same
# push — that raced with this build and could redeploy before the new image was
# actually pushed, silently keeping the old code running. Chaining it here as the
# last step guarantees the image exists before Portainer goes to pull it.
run: curl -f -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"