Initial: ntfy Notify composite action
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
|||||||
|
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'
|
||||||
Reference in New Issue
Block a user