Skip to content

Commit

Permalink
simulate job failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Long committed Apr 15, 2024
1 parent 4d4d2e5 commit cef7ad9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/build_scan_container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ jobs:
${{ steps.inspector.outputs.inspector_scan_results_csv }}
${{ steps.inspector.outputs.artifact_sbom }}
- name: Fail job if vulnerability threshold is exceeded
run: exit ${{ steps.inspector.outputs.vulnerability_threshold_exceeded }}
- name: On vulnerability threshold exceeded

# substitute 'exit' for 'echo' if you want to fail the job
run: echo ${{ steps.inspector.outputs.vulnerability_threshold_exceeded }}

- name: Run custom logic if vulnerability threshold is exceeded
if: failure()
run: |
echo "vulnerability threshold exceeded"
exit 0

0 comments on commit cef7ad9

Please sign in to comment.