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
|
type=sha,prefix=,suffix=,format=short
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
|
id: docker_build
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@@ -46,3 +47,9 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=registry,ref=${{ env.IMAGE }}:cache
|
cache-from: type=registry,ref=${{ env.IMAGE }}:cache
|
||||||
cache-to: type=registry,ref=${{ env.IMAGE }}:cache,mode=max
|
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