File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 34
34
run : ./.github/workflows/audit-dependencies.sh ${{ inputs.audit-level }}
35
35
36
36
- name : Failure output
37
+ id : failure_output
37
38
if : failure()
38
39
run : |
39
40
echo "Vulnerabilities found."
40
41
cat audit_output.json
42
+ # Output json content to GitHub Actions output
43
+ echo "audit_output=$(cat audit_output.json)" >> $GITHUB_OUTPUT
44
+
45
+ - name : Slack notification on failure
46
+ if : failure()
47
+
48
+ with :
49
+ webhook : ${{ secrets.SLACK_TEST_WEBHOOK_URL }}
50
+ webhook-type : incoming-webhook
51
+ payload : |
52
+ text: "🚨 *Dependency Vulnerabilities Found"
53
+ blocks:
54
+ - type: "section"
55
+ text:
56
+ type: "mrkdwn"
57
+ text: "Actionable vulnerabilities found: ${{ steps.failure_output.outputs.audit_output }}"
58
+ - type: "section"
59
+ text:
60
+ type: "mrkdwn"
61
+ text: "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
You can’t perform that action at this time.
0 commit comments