From 976b3e821369f47cb31161d15ece708e2b2667e8 Mon Sep 17 00:00:00 2001 From: David Ansari Date: Fri, 26 Feb 2021 17:32:44 +0100 Subject: [PATCH] Add Slack notifications on failure (#620) since we didn't notice failed release action for a whole week. We don't add the notifications for failed PRs since it would spam our Slack channel whenever someone opens a PR where tests are failing. --- .github/workflows/publish-versioned-api-ref.yml | 7 +++++++ .github/workflows/release.yml | 7 +++++++ .github/workflows/update-latest-api-ref.yml | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/.github/workflows/publish-versioned-api-ref.yml b/.github/workflows/publish-versioned-api-ref.yml index b327c0d77..1118861a2 100644 --- a/.github/workflows/publish-versioned-api-ref.yml +++ b/.github/workflows/publish-versioned-api-ref.yml @@ -36,3 +36,10 @@ jobs: git add ./API_Reference_${{ steps.get_version.outputs.VERSION }}.asciidoc git add ./Wiki_Sidebar.md git commit -m "Publish version ${{ steps.get_version.outputs.VERSION }} API Reference" && git push + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,action,eventName + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2acf5c949..df9f34f18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,3 +14,10 @@ jobs: uses: rajatjindal/krew-release-bot@v0.0.38 with: krew_template_file: hack/rabbitmq.yaml + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,action,eventName + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure() diff --git a/.github/workflows/update-latest-api-ref.yml b/.github/workflows/update-latest-api-ref.yml index 20cb793dd..af61a264b 100644 --- a/.github/workflows/update-latest-api-ref.yml +++ b/.github/workflows/update-latest-api-ref.yml @@ -28,3 +28,10 @@ jobs: cp ../cluster-operator/docs/api/rabbitmq.com.ref.asciidoc ./API_Reference.asciidoc git add ./API_Reference.asciidoc git diff-index --quiet HEAD || git commit -m "Update Latest API Reference" && git push + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + fields: repo,message,action,eventName + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + if: failure()