2023-05-02 02:03:23 +00:00
|
|
|
name: Slack Notification
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
2023-10-19 18:38:40 +00:00
|
|
|
workflows: ["Tests", "Docker Image For Main Builds", "Release Builds", "Build Docs"]
|
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-10-19 18:38:40 +00:00
|
|
|
- name: Notify on Tests failure
|
2023-05-02 16:01:34 +00:00
|
|
|
if: ${{ github.event.workflow_run.conclusion != 'success' && github.event.workflow_run.conclusion != 'skipped' }}
|
2023-05-02 02:03:23 +00:00
|
|
|
run: |
|
|
|
|
curl -X POST -H 'Content-type: application/json' \
|
2023-05-02 16:12:39 +00:00
|
|
|
--data '{"text":"spiff-arena <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow.name }}>: ${{github.event.workflow_run.conclusion}} - branch ${{github.event.workflow_run.head_branch}}"}' \
|
2023-05-02 02:03:23 +00:00
|
|
|
${{ secrets.SLACK_WEBHOOK_URL }}
|