Skip to content

Commit 0785178

Browse files
chore(CI): add slack notifications (#73)
1 parent 73a676b commit 0785178

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/daily_ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# This workflow runs every weekday at 15:00 UTC (8AM PDT)
22
name: Daily CI
3+
permissions:
4+
contents: read
35

46
on:
57
schedule:
@@ -18,3 +20,16 @@ jobs:
1820
uses: ./.github/workflows/ci_test_examples.yml
1921
secrets:
2022
CI_AWS_ACCOUNT_ID: ${{ secrets.CI_AWS_ACCOUNT_ID }}
23+
notify:
24+
needs:
25+
[
26+
daily-ci-go-v3-test,
27+
daily-ci-go-v4-test,
28+
daily-ci-go-migration-examples-test,
29+
]
30+
if: ${{ failure() }}
31+
uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main
32+
with:
33+
message: "Daily CI failed on `${{ github.repository }}`. View run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
34+
secrets:
35+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_CI }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Issue Created Notification
2+
permissions:
3+
contents: read
4+
on:
5+
issues:
6+
types: [opened, reopened]
7+
issue_comment:
8+
types: [created]
9+
10+
jobs:
11+
notify-issue:
12+
if: github.event_name == 'issues'
13+
uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main
14+
with:
15+
message: "New github issue `${{ github.event.issue.title }}`. Link: ${{ github.event.issue.html_url }}"
16+
secrets:
17+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }}
18+
19+
notify-comment:
20+
if: github.event_name == 'issue_comment' && !github.event.issue.pull_request
21+
uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main
22+
with:
23+
message: "New comment on issue `${{ github.event.issue.title }}`. Link: ${{ github.event.comment.html_url }}"
24+
secrets:
25+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }}

0 commit comments

Comments
 (0)