Fix: remove invalid actions param, use shell step for dynamic priority/tags
This commit is contained in:
+15
-7
@@ -19,15 +19,23 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: ntfy-notify
|
||||
- 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
|
||||
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' }}
|
||||
priority: ${{ steps.config.outputs.priority }}
|
||||
tags: ${{ steps.config.outputs.tags }}
|
||||
details: ${{ inputs.message }}
|
||||
actions: 'default'
|
||||
|
||||
Reference in New Issue
Block a user