-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary Fixes #2980 ### Time to review: __2 mins__ ## Testing <img width="531" alt="image" src="https://github.com/user-attachments/assets/d914250a-f997-4e04-9931-5bcaf2bb7216"> (this was made easy by the fact that the API deploy is currently failing due to anchore/grype scans)
- Loading branch information
1 parent
e9eed30
commit 1b85220
Showing
10 changed files
with
76 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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,5 +1,5 @@ | ||
paths: | ||
# actionlint doesn't know how to handle the json inside of this file | ||
.github/workflows/ci-cron-vulnerability-scans.yml: | ||
.github/workflows/send-slack-notification.yml: | ||
ignore: | ||
- ".*SC2046.*" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,32 @@ | ||
name: Slack Notification | ||
|
||
on: workflow_call | ||
|
||
jobs: | ||
send-slack-notification: | ||
name: Send Slack notification on failure | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send Slack notification | ||
run: | | ||
curl -X POST -H "Authorization: Bearer ${{ secrets.ALERTS_SLACK_BOT_TOKEN }}" \ | ||
-H "Content-Type: application/json; charset=utf-8" \ | ||
--data '{ | ||
"channel": "${{ secrets.SLACK_ALERTS_CHANNEL_ID }}", | ||
"text": ":x: *GitHub Actions Failure Alert*", | ||
"attachments": [ | ||
{ | ||
"color": "#ff0000", | ||
"title": "Workflow *'"${{ github.workflow }}"'* failed", | ||
"fields": [ | ||
{ | ||
"title": "Workflow URL", | ||
"value": "'"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"'" | ||
} | ||
], | ||
"footer": "GitHub Actions", | ||
"footer_icon": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png", | ||
"ts": '$(date +%s)' | ||
} | ||
] | ||
}' https://slack.com/api/chat.postMessage |