Skip to content

Workflow failure

Workflow failure #635

name: Workflow failure
on:
workflow_run:
workflows:
- "Merge to main (Production)"
- "Merge to main (Staging)"
- "Build and Push Github ARC Image (Production)"
- "Build and Push Github ARC Image (Staging)"
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":":red: Terraform workflow failed: <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow.name }}>"}}]}'
curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.NOTIFY_DEV_SLACK_WEBHOOK }}