Merge pull request 'Fix GitOps redeploy race: chain to end of build, not a parallel webhook' (#7) from fix/chain-portainer-redeploy-after-build into main
build-agent / build-and-push (push) Successful in 3s

Reviewed-on: #7
This commit was merged in pull request #7.
This commit is contained in:
2026-08-23 15:12:03 +00:00
+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 }}"