Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
berlintay authored Aug 9, 2024
1 parent 8429a76 commit e402b1d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,20 @@ jobs:
--data-urlencode "From=${TWILIO_PHONE_NUMBER}" \
--data-urlencode "To=${TO_PHONE_NUMBER}" \
-u "${TWILIO_ACCOUNT_SID}:${TWILIO_AUTH_TOKEN}"
- name: Notify via Pushover
if: always() # Always run this step
env:
PUSHOVER_USER_KEY: ${{ secrets.PUSHOVER_USER_KEY }}
PUSHOVER_API_TOKEN: ${{ secrets.PUSHOVER_API_TOKEN }}
run: |
if [ "$status" = "down" ]; then
message="Website is down!"
else
message="Website is up and running."
fi
curl -s \
--form-string "token=${PUSHOVER_API_TOKEN}" \
--form-string "user=${PUSHOVER_USER_KEY}" \
--form-string "message=${message}" \
https://api.pushover.net/1/messages.json

0 comments on commit e402b1d

Please sign in to comment.