feat(ci): trigger Portainer webhook after successful image push

This commit is contained in:
Pepe Ziberi
2026-05-19 20:12:16 +02:00
parent 805559efc3
commit 0f635033c2

View File

@@ -38,6 +38,7 @@ jobs:
type=sha,prefix=,suffix=,format=short
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
@@ -46,3 +47,9 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.IMAGE }}:cache
cache-to: type=registry,ref=${{ env.IMAGE }}:cache,mode=max
- name: Trigger Portainer webhook
if: ${{ success() && secrets.PORTAINER_WEBHOOK_URL != '' }}
run: |
echo "Triggering Portainer redeploy..."
curl -sfSL -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}" || echo "Webhook failed (non-critical)"