99 security-check :
1010 name : Security Check
1111 runs-on : ubuntu-latest
12- container : openjdk :17-jdk-slim
12+ container : eclipse-temurin :17
1313 steps :
1414 - uses : actions/checkout@v3
1515 - name : Grant execute permission for gradlew
@@ -36,13 +36,18 @@ jobs:
3636 with :
3737 name : dependency-check-report-baselining
3838 path : ${{ github.workspace }}/reports
39- - name : Send Notification
40- 41- with :
42- webhook : ${{ secrets.SLACK_WEBHOOK_URL }}
43- webhook-type : incoming-webhook
44- payload : |
45- text: "*Baselining Dependency-Check Report*: ${{ steps.depcheck.outcome }}\nPlease check the report here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
39+ # Since GitHub cannot send emails directly, we use an external API
40+ - name : Send Notification via Resend
41+ run : |
42+ curl -X POST https://api.resend.com/emails \
43+ -H "Authorization: Bearer ${{ secrets.RESEND_API_KEY }}" \
44+ -H "Content-Type: application/json" \
45+ -d '{
46+ "from": "inspectIT Ocelot DepCheck <[email protected] >", 47+ 48+ "subject": "Baselining Dependency-Check Report - ${{ steps.depcheck.outcome }}",
49+ "html": "<p>The Dependency-Check for ${{ github.repository }} completed with status: <strong>${{ steps.depcheck.outcome }}</strong></p><p>Please check the report here: <a href='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'>View Report</a></p>"
50+ }'
4651 # if DependencyCheck failed, the job should also fail, but only after the results were uploaded
4752 - name : Validate DependencyCheck outcome
4853 if : ${{ steps.depcheck.outcome == 'failure' }}
0 commit comments