Skip to content

Commit 39b92ee

Browse files
authored
Add Slack notifications
1 parent 0ec159f commit 39b92ee

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,20 @@ jobs:
101101
with:
102102
verbose: true
103103

104+
slack-notify:
105+
needs: [run-tests, style-checks]
106+
if: always()
107+
runs-on: ubuntu-latest
108+
steps:
109+
- uses: technote-space/workflow-conclusion-action@v2
110+
- name: Post to a Slack channel
111+
id: slack
112+
uses: slackapi/slack-github-action@v1.17.0
113+
with:
114+
# Slack channel id, channel name, or user id to post message.
115+
# See also: https://api.slack.com/methods/chat.postMessage#channels
116+
channel-id: '#mo4'
117+
# For posting a simple plain text message
118+
slack-message: "GitHub build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
119+
env:
120+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 commit comments

Comments
 (0)