34 lines
928 B
YAML
34 lines
928 B
YAML
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:
|
||
|
|
- name: ntfy-notify
|
||
|
|
uses: niniyas/ntfy-action@master
|
||
|
|
with:
|
||
|
|
url: ${{ inputs.ntfy_url }}
|
||
|
|
topic: ${{ inputs.ntfy_topic }}
|
||
|
|
priority: ${{ inputs.status == 'failure' && '5' || '3' }}
|
||
|
|
tags: >-
|
||
|
|
${{ inputs.status == 'failure' &&
|
||
|
|
'flying_saucer,warning,🚨,🛠️,action,failed' ||
|
||
|
|
'rocket,white_check_mark,🎉,docker' }}
|
||
|
|
details: ${{ inputs.message }}
|
||
|
|
actions: 'default'
|