Skip to content

Commit

Permalink
add outcome validation
Browse files Browse the repository at this point in the history
  • Loading branch information
EddeCCC committed Nov 29, 2024
1 parent 9836184 commit 96fd696
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/security_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ jobs:
- name: Install dependencies
run: yarn install
- name: Run yarn audit
id: audit
run: yarn audit --no-color --json > yarn-report.json
continue-on-error: true # we still want to upload the report
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: yarn-audit-report
path: yarn-report.json
# 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' }}
run: |
echo "Yarn audit failed"
exit 1

0 comments on commit 96fd696

Please sign in to comment.