Skip to content

OpsGenie Webhook on Down Service Issue #19

OpsGenie Webhook on Down Service Issue

OpsGenie Webhook on Down Service Issue #19

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 }}"}'