Skip to content

Commit

Permalink
add slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
EddeCCC committed Nov 29, 2024
1 parent 0f4874f commit 0b20fd0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/security_check.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Automatic Security Check

on:
# schedule:
# - cron: "0 8 1,15 * *" # At 08:00 on day-of-month 1 and 15
push:
schedule:
- cron: "0 8 1,15 * *" # At 08:00 on day-of-month 1 and 15

jobs:
security-check:
Expand All @@ -25,6 +24,13 @@ jobs:
with:
name: yarn-audit-report
path: yarn-report.json
- name: Send Notification
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
text: "*Boomerang-OTel-Plugin Yarn-Audit Report*: ${{ job.status }}\nPlease check the report here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
# if yarn audit failed, the job should also fail, but only after the results were uploaded
- name: Validate yarn audit outcome
if: ${{ steps.audit.outcome == 'failure' }}
Expand Down

0 comments on commit 0b20fd0

Please sign in to comment.