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:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
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
|
uses: niniyas/ntfy-action@master
|
||||||
with:
|
with:
|
||||||
url: ${{ inputs.ntfy_url }}
|
url: ${{ inputs.ntfy_url }}
|
||||||
topic: ${{ inputs.ntfy_topic }}
|
topic: ${{ inputs.ntfy_topic }}
|
||||||
priority: ${{ inputs.status == 'failure' && '5' || '3' }}
|
priority: ${{ steps.config.outputs.priority }}
|
||||||
tags: >-
|
tags: ${{ steps.config.outputs.tags }}
|
||||||
${{ inputs.status == 'failure' &&
|
|
||||||
'flying_saucer,warning,🚨,🛠️,action,failed' ||
|
|
||||||
'rocket,white_check_mark,🎉,docker' }}
|
|
||||||
details: ${{ inputs.message }}
|
details: ${{ inputs.message }}
|
||||||
actions: 'default'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user