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

18 lines
742 B
YAML
Raw Normal View History

2023-05-01 22:03:23 -04:00
name: Slack Notification
on:
workflow_run:
workflows: ["Backend Tests", "Frontend Tests", "Docker Image For Main Builds", "Release Builds"]
2023-05-01 22:03:23 -04:00
types: [completed]
2023-05-01 20:20:41 -04:00
jobs:
2023-05-01 22:03:23 -04:00
send_notification:
2023-05-01 20:20:41 -04:00
runs-on: ubuntu-latest
steps:
2023-05-02 08:10:41 -04:00
- name: Notify on Backend Tests failure
2023-05-02 12:01:34 -04:00
if: ${{ github.event.workflow_run.conclusion != 'success' && github.event.workflow_run.conclusion != 'skipped' }}
2023-05-01 22:03:23 -04: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-01 22:03:23 -04:00
${{ secrets.SLACK_WEBHOOK_URL }}