Skip to content

Commit 6ef05e7

Browse files
Notify when GHA workflow fails on master
1 parent 23890a8 commit 6ef05e7

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.github/workflows/benchmarks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ jobs:
4949
github-token: ${{ secrets.GITHUB_TOKEN }}
5050
alert-threshold: '200%'
5151
comment-on-alert: true
52+
- name: Slack Notification
53+
env:
54+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
55+
run: |
56+
curl -X POST --data-urlencode "payload={\"text\": \"Benchmark workflow failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
57+
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable') || contains(github.base_ref, 'master')) }}

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ jobs:
4444
env:
4545
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
4646
run: |
47-
curl -X POST --data-urlencode "payload={\"text\": \"Nightly windows build test on Github failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
48-
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable')) }}
47+
curl -X POST --data-urlencode "payload={\"text\": \"Build windows failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
48+
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable') || contains(github.base_ref, 'master')) }}

.github/workflows/codegen_verification.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ jobs:
2020
export GOPATH="${GITHUB_WORKSPACE}/go"
2121
cd go-algorand
2222
scripts/travis/codegen_verification.sh
23+
- name: Slack Notification
24+
env:
25+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
26+
run: |
27+
curl -X POST --data-urlencode "payload={\"text\": \"Codegen verification failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
28+
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable') || contains(github.base_ref, 'master')) }}

.github/workflows/reviewdog.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,9 @@ jobs:
9292
-filter-mode=added
9393
-fail-on-error=false
9494
-level=warning
95+
- name: Slack Notification
96+
env:
97+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
98+
run: |
99+
curl -X POST --data-urlencode "payload={\"text\": \"Reviewdog failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
100+
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable') || contains(github.base_ref, 'master')) }}

0 commit comments

Comments
 (0)