spiff-arena/.github/workflows/slack_notify.yml

18 lines
722 B
YAML
Raw Normal View History

2023-05-02 02:03:23 +00:00
name: Slack Notification
on:
workflow_run:
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:
- 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' \
--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 }}