OpsGenie Webhook on Down Service Issue #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OpsGenie Webhook on Down Service Issue | |
on: | |
issues: | |
types: | |
- opened | |
jobs: | |
trigger_opsgenie: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Issue Title and Trigger OpsGenie | |
env: | |
A2J_OPSGENIE_KEY: ${{ secrets.A2J_OPSGENIE_KEY }} | |
if: contains(github.event.issue.title, 'service.justiz.de is down') | |
run: | | |
echo "Creating OpsGenie alert for 'service.justiz.de is down' issue..." | |
curl -X POST https://api.opsgenie.com/v2/alerts -H "Content-Type: application/json" -H "Authorization: GenieKey $A2J_OPSGENIE_KEY" -d '{"message": "service.justiz.de is down","alias": "${{ github.event.issue.number }}"}' |