notifcation through ntfy
Some checks failed
Explore-GitHub-Actions

This commit is contained in:
lobo 2023-02-26 19:48:04 +00:00
parent 7be84de47e
commit 52f01a5c49

View File

@ -16,3 +16,19 @@ jobs:
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Success Notification
if: success()
run: |
curl -u '${{ secrets.NTFY_USER }}:${{ secrets.NTFY_PASSWORD }}' \
-H 'Title: Job Succeeded. ${{ github.repository }}/${{ github.ref }}' \
-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 }}' \
-d 'Job failed. See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_number }} for details'
'${{ secrets.NTFY_HOST }}${{ secrets.NTFY_TOPIC }}''