From c78e04991389037828c136e500a5ccf811bf13d7 Mon Sep 17 00:00:00 2001 From: trafficlunar Date: Fri, 10 Jan 2025 20:52:53 +0000 Subject: [PATCH] feat: ntfy workflow --- .github/workflows/ntfy.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/ntfy.yaml diff --git a/.github/workflows/ntfy.yaml b/.github/workflows/ntfy.yaml new file mode 100644 index 0000000..b0fbd3d --- /dev/null +++ b/.github/workflows/ntfy.yaml @@ -0,0 +1,21 @@ +- name: Notify on Success + if: success() + run: | + curl \ + -H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \ + -H "Title: blockmatic deployment succeeded" \ + -H "Priority: low" \ + -H "Tags: white_check_mark" \ + -d $'Commit: ${{ github.event.head_commit.message }}\nHash: ${{ github.sha }}' \ + ${{ secrets.NTFY_URL }} + +- name: Notify on Failure + if: failure() + run: | + curl \ + -H "Authorization: Bearer ${{ secrets.NTFY_TOKEN }}" \ + -H "Title: blockmatic deployment failed" \ + -H "Priority: max" \ + -H "Tags: x" \ + -d $'Commit: ${{ github.event.head_commit.message }}\nHash: ${{ github.sha }}' \ + ${{ secrets.NTFY_URL }}