Check for master failure #12707
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: Check for master failure | |
| on: | |
| workflow_run: | |
| workflows: ["Build and Test", "Build with conda", "Build with analysis tools", "Coverity Static Analysis", "Installation Tests Execution"] | |
| types: [completed] | |
| jobs: | |
| on-failure: | |
| runs-on: ubuntu-latest | |
| # This condition aims to include scheduled workflow failures which does not appear on Slack. The reason is that they might not carry head_branch info | |
| if: | | |
| (github.event.workflow_run.conclusion == 'failure' || | |
| github.event.workflow_run.conclusion == 'timed_out') && | |
| (github.event.workflow_run.head_branch == 'master' || | |
| github.event.workflow_run.head_branch == '') | |
| steps: | |
| - uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 | |
| with: | |
| status: ${{ github.event.workflow_run.conclusion }} | |
| notification_title: " ${{github.event.workflow_run.name}} - ${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}} - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>" | |
| message_format: ":fire: *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|${{github.repository}}>" | |
| footer: "Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |