From f8745efb338b1ab1cf2e8d375b5d9bbfdb793528 Mon Sep 17 00:00:00 2001 From: Angelo Buono Date: Fri, 28 Jun 2024 16:31:37 +0200 Subject: [PATCH] Notify on slack when the dogfood_merge fails (#4834) --- .github/workflows/dogfood.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/dogfood.yml b/.github/workflows/dogfood.yml index 8eb81c98701..532ec99d7d0 100644 --- a/.github/workflows/dogfood.yml +++ b/.github/workflows/dogfood.yml @@ -34,3 +34,12 @@ jobs: # Use the output from the `dogfood` step - name: Get the name of the dogfood branch and its HEAD SHA1 run: echo "The dogfood branch was `${{ steps.dogfood.outputs.dogfood-branch }}` and its HEAD SHA1 was `${{ steps.dogfood.outputs.sha1 }}`" + # Notify on Slack + - name: Notify failures on Slack + if: failure() + uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 + env: + SLACK_BOT_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).SLACK_BOT_TOKEN }} + with: + channel-id: squad-jvm-notifs + slack-message: "Dogfood build for `${{ steps.dogfood.outputs.sha1 }}`: *failed*, see the logs at https://github.com/SonarSource/sonar-java/actions/workflows/dogfood.yml"