Add ntfy success/failure notifications to Docker build workflow
This commit is contained in:
@@ -53,3 +53,23 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: Notify success
|
||||
if: success()
|
||||
run: |
|
||||
curl -s -X POST "${{ secrets.NTFY_URL }}" \
|
||||
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
||||
-H "Title: check-printing built ✓" \
|
||||
-H "Priority: default" \
|
||||
-H "Tags: white_check_mark" \
|
||||
-d "Image pushed: ${{ env.IMAGE_NAME }}@${{ github.sha }}"
|
||||
|
||||
- name: Notify failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -s -X POST "${{ secrets.NTFY_URL }}" \
|
||||
-H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \
|
||||
-H "Title: check-printing build failed ✗" \
|
||||
-H "Priority: high" \
|
||||
-H "Tags: x" \
|
||||
-d "Build failed on ${{ github.ref_name }} — ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
||||
|
||||
Reference in New Issue
Block a user