ci: pushover notification on success too
ci/woodpecker/push/woodpecker Pipeline was successful

Single notify step now runs for both success and failure
(when.status: [success, failure]), branching on
CI_PIPELINE_STATUS for the title. Success uses Pushover
priority -1 (quiet) so passing-build pings don't alert at
night; failures stay at priority 0 (default).
This commit is contained in:
2026-05-09 11:50:28 -05:00
parent c0061491ab
commit e044141043
+11 -3
View File
@@ -17,7 +17,7 @@ steps:
commands: commands:
- npm run build - npm run build
- name: notify-failure - name: notify
image: curlimages/curl:latest image: curlimages/curl:latest
environment: environment:
PUSHOVER_TOKEN: PUSHOVER_TOKEN:
@@ -26,13 +26,21 @@ steps:
from_secret: pushover_user from_secret: pushover_user
commands: commands:
- | - |
if [ "$CI_PIPELINE_STATUS" = "success" ]; then
TITLE="Halfstreet CI passed"
PRIORITY=-1
else
TITLE="Halfstreet CI failed"
PRIORITY=0
fi
curl -s \ curl -s \
--form-string "token=$PUSHOVER_TOKEN" \ --form-string "token=$PUSHOVER_TOKEN" \
--form-string "user=$PUSHOVER_USER" \ --form-string "user=$PUSHOVER_USER" \
--form-string "title=Halfstreet CI failed" \ --form-string "title=$TITLE" \
--form-string "priority=$PRIORITY" \
--form-string "message=$CI_COMMIT_BRANCH: $CI_COMMIT_MESSAGE" \ --form-string "message=$CI_COMMIT_BRANCH: $CI_COMMIT_MESSAGE" \
--form-string "url=$CI_PIPELINE_URL" \ --form-string "url=$CI_PIPELINE_URL" \
--form-string "url_title=View pipeline" \ --form-string "url_title=View pipeline" \
https://api.pushover.net/1/messages.json https://api.pushover.net/1/messages.json
when: when:
- status: failure - status: [success, failure]