Skip to content

Commit 1f4a0ee

Browse files
committed
add email & slack notifier action in github workflow
1 parent c1645bb commit 1f4a0ee

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Diff for: .github/workflows/weekly-security-scan.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,39 @@ jobs:
3030
go-version: ${{ steps.vars.outputs.go_version }}
3131
- name: Run verify security target
3232
run: make verify-security
33+
# Send email notification
34+
- name: Send Email Notification (Success)
35+
if: success()
36+
uses: cinotify/github-action@main
37+
with:
38+
39+
subject: "Security scan completed successfully"
40+
body: |
41+
The security scan for branch ${{ matrix.branch }} completed successfully.
42+
Please review the results if necessary.
43+
type: 'text/plain'
44+
- name: Send Email Notification (Failure)
45+
if: failure()
46+
uses: cinotify/github-action@main
47+
with:
48+
49+
subject: "Security scan failed"
50+
body: |
51+
The security scan for branch ${{ matrix.branch }} has failed.
52+
Please review the results and take appropriate action.
53+
type: 'text/plain'
54+
# Send slack notification
55+
- name: Send Slack Notification (Success)
56+
if: success()
57+
uses: slackapi/slack-github-action@v1
58+
with:
59+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
60+
channel: '#channel'
61+
text: "Security scan completed successfully on branch ${{ matrix.branch }}."
62+
- name: Send Slack Notification (Failure)
63+
if: failure()
64+
uses: slackapi/slack-github-action@v1
65+
with:
66+
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
67+
channel: '#channel'
68+
text: "Security scan failed on branch ${{ matrix.branch }}. Please review the results."

0 commit comments

Comments
 (0)