Skip to content

Commit 6c6bd34

Browse files
committed
Update Slack notification for CI
Update the Slack notification sent after CI job to go to success or failed channel
1 parent 0ff3a94 commit 6c6bd34

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,28 @@ jobs:
4141
needs: ci
4242
runs-on: ubuntu-latest
4343
steps:
44-
- name: Send Slack notification
44+
- name: Send Slack notification on success
45+
if: success()
46+
uses: 8398a7/action-slack@v3
47+
with:
48+
author_name: Python Server SDK
49+
status: ${{ needs.ci.result }}
50+
fields: repo,message,commit,action,workflow,took
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_SUCCESS_WEBHOOK_URL }}
54+
55+
- name: Send Slack notification on failure
56+
if: failure() || cancelled()
4557
uses: 8398a7/action-slack@v3
4658
with:
4759
author_name: Python Server SDK
4860
status: ${{ needs.ci.result }}
49-
fields: repo,message,action,took
61+
fields: repo,message,commit,action,workflow,took
5062
env:
5163
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
64+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_FAILED_WEBHOOK_URL }}
65+
5366
cd:
5467
needs: ci
5568
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)