Skip to content

Commit

Permalink
style: update check vulnerabilites yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenkhoi2806 committed Jan 2, 2025
1 parent f5a6f7c commit 2e00351
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/check-vulnerabilities.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: 'Package Audit and Comment on Vulnerabilities'

on:
pull_request:
branches:
Expand Down Expand Up @@ -36,18 +35,8 @@ jobs:
echo "Audit result: $result"
echo "$result" > audit-result.json
if echo "$result" | grep -q '"advisory"'; then
echo "Vulnerabilities found!"
echo "Vulnerabilities found"
exit 1
else
echo "No vulnerabilities found."
fi
- name: Post comment on PR if vulnerabilities found
if: failure()
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
🚨 **Vulnerabilities Found** 🚨
There are vulnerabilities detected during the `pnpm audit`. Please check the audit results.
You can run `pnpm audit` locally to view more details.

0 comments on commit 2e00351

Please sign in to comment.