Skip to content

Workflow failure

Workflow failure #253

name: Workflow failure
on:
workflow_run:
workflows:
- "Terraform drift check"
- "Terraform Apply"
types:
- completed
jobs:
on-failure:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'failure'
steps:
- name: Notify Slack
run: |
json='{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":":dumpster-fire: `cds-aws-lz` workflow has failed: <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow.name }}>"}}]}'
curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.AFT_NOTIFICATIONS_HOOK }}