feat(ci): trigger Portainer webhook after successful image push
This commit is contained in:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user