2023-05-02 02:03:23 +00:00
|
|
|
name: Slack Notification
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: ["Backend Tests"]
|
|
|
|
types: [completed]
|
|
|
|
|
2023-05-02 00:20:41 +00:00
|
|
|
jobs:
|
2023-05-02 02:03:23 +00:00
|
|
|
send_notification:
|
|
|
|
if: ${{ failure() }}
|
2023-05-02 00:20:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-02 02:03:23 +00:00
|
|
|
- name: Send Slack notification
|
|
|
|
run: |
|
|
|
|
curl -X POST -H 'Content-type: application/json' \
|
|
|
|
--data '{"text":"Workflow <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow.name }}> failed!"}' \
|
|
|
|
${{ secrets.SLACK_WEBHOOK_URL }}
|