2023-05-02 02:03:23 +00:00
|
|
|
name: Slack Notification
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
2023-05-02 12:39:13 +00:00
|
|
|
workflows: ["Backend Tests", "Frontend Tests", "Docker Image For Main Builds", "Release Builds"]
|
2023-05-02 02:03:23 +00:00
|
|
|
types: [completed]
|
|
|
|
|
2023-05-02 00:20:41 +00:00
|
|
|
jobs:
|
2023-05-02 02:03:23 +00:00
|
|
|
send_notification:
|
2023-05-02 00:20:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-02 12:10:41 +00:00
|
|
|
- name: Notify on Backend Tests failure
|
|
|
|
if: ${{ github.event.workflow_run.conclusion != 'success' }}
|
2023-05-02 02:03:23 +00:00
|
|
|
run: |
|
|
|
|
curl -X POST -H 'Content-type: application/json' \
|
2023-05-02 12:39:13 +00:00
|
|
|
--data '{"text":"spiff-arena workflow <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow.name }}> ended with conclusion ${{github.event.workflow_run.conclusion}}!"}' \
|
2023-05-02 02:03:23 +00:00
|
|
|
${{ secrets.SLACK_WEBHOOK_URL }}
|