test-failure #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |