Skip to content

Commit 3a6da8c

Browse files
Enhance daily CI workflow with failure notifications
Added a notification job for failed daily CI runs.
1 parent d8b7631 commit 3a6da8c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/daily_ci.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@ name: Daily CI
44
on:
55
schedule:
66
- cron: "00 15 * * 1-5"
7-
7+
pull_request:
8+
paths:
9+
.github/workflows/daily_ci.yml
810
jobs:
911
DAILY_CI:
1012
# Don't run the cron builds on forks
1113
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
12-
uses: ./.github/workflows/ci.yml
14+
uses: ./.github/workflows/ci.yml
15+
notify:
16+
needs:
17+
[
18+
DAILY_CI
19+
]
20+
if: ${{ failure() && github.event_name != 'schedule'}}
21+
uses: ./.github/workflows/slack-notification.yml
22+
with:
23+
message: "Daily CI failed on `${{ github.repository }}`. View run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
24+
secrets:
25+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_CI }}

0 commit comments

Comments
 (0)