ci: send slack message when ci fails on main #107
Workflow file for this run
This file contains hidden or 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: Pull Request Integration | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| uses: ./.github/workflows/test.yaml | |
| secrets: inherit | |
| check_formatting: | |
| uses: ./.github/workflows/check_formatting.yaml | |
| notify-slack: | |
| needs: test | |
| if: failure() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send Slack Notification | |
| uses: slackapi/slack-github-action@v1.26.0 | |
| with: | |
| payload: | | |
| { | |
| "text": ":rotating_light: *CI FAILED on main!*", | |
| "attachments": [ | |
| { | |
| "color": "danger", | |
| "text": "Workflow: ${{ github.workflow }}\nJob: ${{ github.job }}\nCommit: ${{ github.sha }}\nAuthor: ${{ github.actor }}" | |
| } | |
| ] | |
| } | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |