-
Notifications
You must be signed in to change notification settings - Fork 3
21 lines (19 loc) · 1.18 KB
/
slack-notification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
name: Test Failure Notification
on:
repository_dispatch:
types: [ test-failure ]
jobs:
slack-notification:
runs-on: ubuntu-latest
steps:
- name: Notify Slack on Build Failure
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ github.event.action == 'test-failure' && 'danger' || 'good' }}
SLACK_MESSAGE: "View details on GitHub Actions: ${{ github.event.client_payload.server_url }}/${{ github.event.client_payload.repository }}/actions/runs/${{ github.event.client_payload.run_id }} <@U042HRTL4DT>. Triggered by repository: ${{ github.event.client_payload.repository }} and job: ${{ github.job }}"
SLACK_TITLE: "❌ ${{ github.event.client_payload.repository }} ❌ Tests failed on branch ${{ github.event.client_payload.branch }} for commit ${{ github.event.client_payload.sha }} in repository ${{ github.event.client_payload.repository }}"
SLACK_USERNAME: liquibot
SLACK_WEBHOOK: ${{ secrets.NIGHTLY_BUILDS_SLACK_WEBHOOK }}
SLACK_ICON_EMOJI: ":robot_face:"
SLACK_FOOTER: "${{ github.event.client_payload.repository }}"
SLACK_LINK_NAMES: true