Skip to content

Commit 2751179

Browse files
authored
Merge pull request #182 from GetStream/feature/add-slack-notification-when-ci-cd-fails
Add Slack notification
2 parents ffd6f92 + 87d3a4e commit 2751179

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/main.ci.cd.workflow.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches: [ main, develop ]
77
pull_request:
88
branches: [ main, develop ]
9+
schedule:
10+
- cron: "0 0 * * *" # run daily at midnight (UTC)
911

1012
jobs:
1113
build:
@@ -217,3 +219,14 @@ jobs:
217219
with:
218220
name: Build_${{ env.BUILD_NAME }}
219221
path: $(pwd)/SampleAppBuild/${{ env.BUILD_NAME }}
222+
223+
- name: Notify Slack if failed
224+
uses: voxmedia/github-action-slack-notify-build@v1
225+
if: always() && failure()
226+
with:
227+
channel_id: C07KW7ZCJ6T
228+
color: danger
229+
status: FAILED
230+
env:
231+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
232+

0 commit comments

Comments
 (0)