From 37dc35c1a1b988143246e8d1ea5ea3cb2392e641 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Mon, 30 Oct 2023 12:09:19 -0300 Subject: [PATCH] report master/release-* failures (#25197) --- .github/workflows/workflow-failure-check.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/workflow-failure-check.yml diff --git a/.github/workflows/workflow-failure-check.yml b/.github/workflows/workflow-failure-check.yml new file mode 100644 index 0000000000..4d7e9c12c5 --- /dev/null +++ b/.github/workflows/workflow-failure-check.yml @@ -0,0 +1,19 @@ +name: Report on master workflow failure +on: + workflow_run: + workflows: [Server CI Master, Web App CI Master] + types: [completed] + +jobs: + on-failure: + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'failure' + steps: + name: Report failure + run: | + curl \ + --fail \ + -X POST \ + -H "Content-Type: application/json" \ + -d "{\"text\":\"#### ⚠️ ${{github.repository}}/${{ github.event.workflow_run.head_branch }} - ${{github.event.workflow_run.name}} build failure ⚠️\\nThe build is failing: [view failure](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}).\\n\"}" \ + ${{ secrets.MM_COMMUNITY_DEVELOPERS_INCOMING_WEBHOOK_FROM_GH_ACTIONS }}