-
Notifications
You must be signed in to change notification settings - Fork 66
chore(ci): add slack notification when failure #1622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3a6da8c
Enhance daily CI workflow with failure notifications
rishav-karanjit babee7b
Change condition for Slack notification on CI failure
rishav-karanjit e0784a9
Update Daily CI workflow with permissions
rishav-karanjit 9bcb3ff
Add GitHub Actions workflow for issue notifications
rishav-karanjit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,29 @@ | ||
| # This workflow runs every weekday at 15:00 UTC (8AM PDT) | ||
| name: Daily CI | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "00 15 * * 1-5" | ||
|
|
||
| pull_request: | ||
| paths: | ||
| .github/workflows/daily_ci.yml | ||
| jobs: | ||
| DAILY_CI: | ||
| # Don't run the cron builds on forks | ||
| if: github.event_name != 'schedule' || github.repository_owner == 'aws' | ||
| uses: ./.github/workflows/ci.yml | ||
| uses: ./.github/workflows/ci.yml | ||
| notify: | ||
| needs: | ||
| [ | ||
| DAILY_CI | ||
| ] | ||
| if: ${{ failure() && github.event_name == 'schedule'}} | ||
| uses: ./.github/workflows/slack-notification.yml | ||
| with: | ||
| message: "Daily CI failed on `${{ github.repository }}`. View run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
| secrets: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_CI }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: Issue Created Notification | ||
| permissions: | ||
| contents: read | ||
| on: | ||
| issues: | ||
| types: [opened, reopened] | ||
| issue_comment: | ||
| types: [created] | ||
|
|
||
| jobs: | ||
| notify-issue: | ||
| if: github.event_name == 'issues' | ||
| uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main | ||
| with: | ||
| message: "New github issue `${{ github.event.issue.title }}`. Link: ${{ github.event.issue.html_url }}" | ||
| secrets: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }} | ||
|
|
||
| notify-comment: | ||
| if: github.event_name == 'issue_comment' && !github.event.issue.pull_request | ||
| uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main | ||
| with: | ||
| message: "New comment on issue `${{ github.event.issue.title }}`. Link: ${{ github.event.comment.html_url }}" | ||
| secrets: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.