new notification updates
Some checks failed
Apply Kuberentes Configs / update-repo (push) Successful in 0s
Apply Kuberentes Configs / update-infrastructure (push) Failing after 2s
Apply Kuberentes Configs / notify-on-failure (push) Successful in 0s

This commit is contained in:
2026-02-18 20:45:24 -07:00
parent 02bbb0e425
commit 870e26f0e7
2 changed files with 16 additions and 11 deletions

View File

@@ -69,7 +69,6 @@ jobs:
Repository: ${{ gitea.repository }}
Job: update-infrastructure
Status: ${{ needs.update-infrastructure.result }}
Time: ${{ gitea.run_started_at }}
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}/jobs/${{ gitea.job }}"
action_url: "https://git.alexmickelson.guru/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}"
priority: "high"
tags: "rotating_light,kubernetes"

View File

@@ -32,15 +32,21 @@ jobs:
working-directory: /home/gitea-runner
run: |
set -e
ACTION_HEADER=""
if [ -n "${{ inputs.action_url }}" ]; then
ACTION_HEADER='-H "Actions: view, View Logs, ${{ inputs.action_url }}"'
fi
cat <<EOF | curl -f -H "Title: ${{ inputs.title }}" \
-H "Priority: ${{ inputs.priority }}" \
-H "Tags: ${{ inputs.tags }}" \
$ACTION_HEADER \
--data-binary "@-" \
"https://ntfy.sh/${{ secrets.NTFY_CHANNEL }}"
cat <<EOF | curl -f -H "Title: ${{ inputs.title }}" \
-H "Priority: ${{ inputs.priority }}" \
-H "Tags: ${{ inputs.tags }}" \
-H "Actions: view, View Logs, ${{ inputs.action_url }}" \
--data-binary "@-" \
"https://ntfy.sh/${{ secrets.NTFY_CHANNEL }}"
${{ inputs.message }}
EOF
else
cat <<EOF | curl -f -H "Title: ${{ inputs.title }}" \
-H "Priority: ${{ inputs.priority }}" \
-H "Tags: ${{ inputs.tags }}" \
--data-binary "@-" \
"https://ntfy.sh/${{ secrets.NTFY_CHANNEL }}"
${{ inputs.message }}
EOF
fi