From dfce2688743f77c78d097a0df43469fdae33cedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 19:51:37 +0100 Subject: [PATCH] Differentiate Ntfy Notification when success/failure --- .gitea/workflows/demo.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index b796cbb..a2b448f 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -21,11 +21,29 @@ jobs: - name: Run e2e tests run: npm run e2e - - name: ntfy-notifications + + - name: ntfy-notifications-failure uses: niniyas/ntfy-action@master + if: failure() with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' + priority: 5 + tags: +1,partying_face,action,failed + details: Workflow has failed! + actions: 'default' + - name: ntfy-notifications-success + uses: niniyas/ntfy-action@master + if: success() + with: + url: ${{ secrets.NTFY_URL }} + topic: ${{ secrets.NTFY_TOPIC }} + priority: 4 + headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' + tags: +1,partying_face,action,successfully,completed + details: Workflow has been successfully completed! + icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png' + image: true