Skip to content

Commit 992f98b

Browse files
committed
Add notification for discord hook
1 parent 8eaa444 commit 992f98b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,29 @@ jobs:
6565
env:
6666
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
6767
TESTING_DB_USERNAME: root
68+
- name: notify discord
69+
if: ${{ failure() }}
70+
uses: rjstone/discord-webhook-notify@v1
71+
with:
72+
severity: error
73+
username: Github Actions
74+
color: "#D01124"
75+
description: Tests are currently failing.
76+
details: |
77+
78+
Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}
79+
footer: ${GITHUB_SHA::8}
80+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
81+
- name: notify discord
82+
if: ${{ success() }}
83+
uses: rjstone/discord-webhook-notify@v1
84+
with:
85+
severity: info
86+
username: Github Actions
87+
color: "#0F8513"
88+
description: Tests passed.
89+
details: |
90+
91+
Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}
92+
footer: ${GITHUB_SHA::8}
93+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}

0 commit comments

Comments
 (0)