From 74c4ff9706ce78243b823a0f751c2f63b244a123 Mon Sep 17 00:00:00 2001 From: Alberto Fumagalli Date: Fri, 26 Apr 2024 16:13:41 -0400 Subject: [PATCH 1/2] add new job --- .github/workflows/alert-failed-jobs.yaml | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/alert-failed-jobs.yaml diff --git a/.github/workflows/alert-failed-jobs.yaml b/.github/workflows/alert-failed-jobs.yaml new file mode 100644 index 0000000000..5603046dfe --- /dev/null +++ b/.github/workflows/alert-failed-jobs.yaml @@ -0,0 +1,25 @@ +name: Notify on main failures +on: + workflow_run: + branches: + - main + types: + - completed + workflows: + - Build Catalyst Wheel on Linux (x86_64) + - Build Catalyst Wheel on macOS (arm64) + - Build Catalyst Wheel on macOS (x86_64) + +jobs: + on-failure: + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out' + steps: + - uses: ravsamhq/notify-slack-action@v2 + 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}}/${{github.event.workflow_run.head_branch}}|${{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_FAILED_JOBS_WEBHOOK }} From 25b50a7d9fc0307d5a2a242990da816a33024274 Mon Sep 17 00:00:00 2001 From: Alberto Fumagalli Date: Fri, 26 Apr 2024 16:14:29 -0400 Subject: [PATCH 2/2] change job name --- .../{alert-failed-jobs.yaml => notify-failed-jobs.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{alert-failed-jobs.yaml => notify-failed-jobs.yaml} (94%) diff --git a/.github/workflows/alert-failed-jobs.yaml b/.github/workflows/notify-failed-jobs.yaml similarity index 94% rename from .github/workflows/alert-failed-jobs.yaml rename to .github/workflows/notify-failed-jobs.yaml index 5603046dfe..a46d601ee8 100644 --- a/.github/workflows/alert-failed-jobs.yaml +++ b/.github/workflows/notify-failed-jobs.yaml @@ -22,4 +22,4 @@ jobs: message_format: ":fire: *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <${{github.server_url}}/${{github.repository}}/${{github.event.workflow_run.head_branch}}|${{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_FAILED_JOBS_WEBHOOK }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFICATIONS_WEBHOOK_URL }}