2026-07-22 14:13:45 +02:00
|
|
|
name: 'ntfy Notify'
|
|
|
|
|
description: 'Send a ntfy notification for CI success or failure'
|
|
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
|
ntfy_url:
|
|
|
|
|
description: 'ntfy server URL'
|
|
|
|
|
default: 'https://ntfy.zlymeda.dynu.net'
|
|
|
|
|
required: false
|
|
|
|
|
ntfy_topic:
|
|
|
|
|
description: 'ntfy topic'
|
|
|
|
|
required: true
|
|
|
|
|
status:
|
|
|
|
|
description: 'Notification status: success or failure'
|
|
|
|
|
required: true
|
|
|
|
|
message:
|
|
|
|
|
description: 'Notification message body'
|
|
|
|
|
default: ''
|
|
|
|
|
|
|
|
|
|
runs:
|
|
|
|
|
using: composite
|
|
|
|
|
steps:
|
2026-07-22 14:30:17 +02:00
|
|
|
- name: Configure notification
|
|
|
|
|
id: config
|
|
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
if [ "${{ inputs.status }}" = "failure" ]; then
|
|
|
|
|
echo "priority=5" >> "$GITHUB_OUTPUT"
|
|
|
|
|
echo "tags=flying_saucer,warning,🚨,🛠️,action,failed" >> "$GITHUB_OUTPUT"
|
|
|
|
|
else
|
|
|
|
|
echo "priority=3" >> "$GITHUB_OUTPUT"
|
|
|
|
|
echo "tags=rocket,white_check_mark,🎉,docker" >> "$GITHUB_OUTPUT"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
- name: Send ntfy notification
|
2026-07-22 14:13:45 +02:00
|
|
|
uses: niniyas/ntfy-action@master
|
|
|
|
|
with:
|
|
|
|
|
url: ${{ inputs.ntfy_url }}
|
|
|
|
|
topic: ${{ inputs.ntfy_topic }}
|
2026-07-22 14:30:17 +02:00
|
|
|
priority: ${{ steps.config.outputs.priority }}
|
|
|
|
|
tags: ${{ steps.config.outputs.tags }}
|
2026-07-22 14:13:45 +02:00
|
|
|
details: ${{ inputs.message }}
|