From 68c388a34f0f13f749760be3aa8dc16af8540245 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Mon, 27 Mar 2023 15:38:27 -0700 Subject: [PATCH] update to use ntfy action --- .gitea/workflows/build.yaml | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 7ba6e44..ff07d19 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -32,20 +32,11 @@ jobs: - run: zig build -Dtarget=riscv64-linux - run: zig build -Dtarget=x86_64-macos - run: zig build -Dtarget=aarch64-macos - - name: Success Notification - if: success() - run: | - curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \ - -H 'Title: Job Succeeded. ${{ github.repository }}/${{ github.ref }}' \ - -H "Tags: +1" \ - -d 'Job succeeded. See '$GITHUB_SERVER_URL'/${{ github.repository }}/actions/runs/${{ github.run_number }} for details' \ - '${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}' - - name: Failure Notification - if: failure() - run: | - curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \ - -H "Priority: high" \ - -H 'Title: Job FAILED. ${{ github.repository }}/${{ github.ref }}' \ - -H "Tags: warning" \ - -d 'Job failed. See '$GITHUB_SERVER_URL'/${{ github.repository }}/actions/runs/${{ github.run_number }} for details' \ - '${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}' + - name: Notify + uses: https://git.lerch.org/lobo/action-notify-ntfy@v1 + if: always() + with: + host: ${{ secrets.NTFY_HOST }} + topic: ${{ secrets.NTFY_TOPIC }} + user: ${{ secrets.NTFY_USER }} + password: ${{ secrets.NTFY_PASSWORD }}