forked from asyncapi/website
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (24 loc) · 932 Bytes
/
slack-notification.yml
File metadata and controls
27 lines (24 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Slack Notifications
on:
workflow_run:
workflows: ['*']
types: [completed]
branches: [master]
jobs:
slack-notifications:
if: >
github.repository == 'asyncapi/website' &&
github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.name != 'Slack Notifications'
runs-on: ubuntu-latest
steps:
- name: Send Slack notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.WEBSITE_SLACK_WEBHOOK }}
SLACK_TITLE: 'Github Failed Workflow Notification'
SLACK_MESSAGE: |
🚨 The workflow <${{ github.event.workflow_run.html_url }}|${{ github.event.workflow_run.name }}> failed on branch *master*.
Commit: ${{ github.event.workflow_run.head_sha }}
cc: <!subteam^${{secrets.WEBSITE_MAINTAINERS_SLACK_GROUP_ID}}|maintainers_website>
MSG_MINIMAL: true