From 7aa1d462b30464f0699f72df21ec980b95473c40 Mon Sep 17 00:00:00 2001 From: Stephan Hadan Date: Sun, 26 Jan 2025 20:44:25 +0100 Subject: [PATCH] added ntfy trigger cancelled and failure --- .gitea/workflows/develop.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitea/workflows/develop.yml b/.gitea/workflows/develop.yml index 82a4fd6..3f71db3 100644 --- a/.gitea/workflows/develop.yml +++ b/.gitea/workflows/develop.yml @@ -31,6 +31,7 @@ jobs: uses: https://github.com/niniyas/ntfy-action@master if: success() with: + title: 'Forgejo Actions" url: '${{ secrets.NTFY_URL }}' topic: '${{ secrets.NTFY_TOPIC }}' priority: 4 @@ -40,4 +41,30 @@ jobs: icon: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Forgejo_logo.svg/512px-Forgejo_logo.svg.png' image: true + - name: ntfy-failed-notifications + uses: https://github.com/niniyas/ntfy-action@master + if: failure() + with: + title: 'Forgejo Actions' + url: '${{ secrets.NTFY_URL }}' + topic: '${{ secrets.NTFY_TOPIC }}' + priority: 5 + headers: '${{ secrets.NTFY_HEADERS }}' + tags: +1,partying_face,action,failed + details: Workflow has failed! + actions: 'default' + + - name: ntfy-cancelled-notifications + uses: https://github.com/niniyas/ntfy-action@master + if: cancelled() + with: + title: 'Forgejo Actions' + url: '${{ secrets.NTFY_URL }}' + topic: '${{ secrets.NTFY_TOPIC }}' + priority: 3 + headers: '${{ secrets.NTFY_HEADERS }}' + tags: +1,partying_face,action,cancelled + details: Workflow has been cancelled! + actions: '[{"action": "view", "label": "Open portal", "url": "https://techstack.preview.hadan.de/", "clear": true}]' + - run: echo "This job's status is ${{ job.status }}."