Replace niniyas/ntfy-action dependency with direct curl call
This commit is contained in:
+15
-15
@@ -19,23 +19,23 @@ inputs:
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Configure notification
|
||||
id: config
|
||||
- name: Send ntfy notification
|
||||
shell: bash
|
||||
env:
|
||||
NTFY_URL: ${{ inputs.ntfy_url }}
|
||||
NTFY_TOPIC: ${{ inputs.ntfy_topic }}
|
||||
MESSAGE: ${{ inputs.message }}
|
||||
run: |
|
||||
if [ "${{ inputs.status }}" = "failure" ]; then
|
||||
echo "priority=5" >> "$GITHUB_OUTPUT"
|
||||
echo "tags=flying_saucer,warning,🚨,🛠️,action,failed" >> "$GITHUB_OUTPUT"
|
||||
PRIORITY=5
|
||||
TAGS="flying_saucer,warning,🚨,🛠️,action,failed"
|
||||
else
|
||||
echo "priority=3" >> "$GITHUB_OUTPUT"
|
||||
echo "tags=rocket,white_check_mark,🎉,docker" >> "$GITHUB_OUTPUT"
|
||||
PRIORITY=3
|
||||
TAGS="rocket,white_check_mark,🎉,docker"
|
||||
fi
|
||||
|
||||
- name: Send ntfy notification
|
||||
uses: niniyas/ntfy-action@master
|
||||
with:
|
||||
url: ${{ inputs.ntfy_url }}
|
||||
topic: ${{ inputs.ntfy_topic }}
|
||||
priority: ${{ steps.config.outputs.priority }}
|
||||
tags: ${{ steps.config.outputs.tags }}
|
||||
details: ${{ inputs.message }}
|
||||
curl -sf \
|
||||
-H "Title: CI Notification" \
|
||||
-H "Priority: ${PRIORITY}" \
|
||||
-H "Tags: ${TAGS}" \
|
||||
-d "${MESSAGE}" \
|
||||
"${NTFY_URL}/${NTFY_TOPIC}"
|
||||
|
||||
Reference in New Issue
Block a user