Skip to content

Commit

Permalink
fix yaml parsing error (#29)
Browse files Browse the repository at this point in the history
* fix yaml parsing error

* return exit 0

* replace 'return' with 'exit'

* simulate job failure

---------

Co-authored-by: Michael Long <[email protected]>
  • Loading branch information
bluesentinelsec and Michael Long authored Apr 15, 2024
1 parent fc023e9 commit ac3c87c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/build_scan_container.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Demonstrate Build and Scan Container Image Scan
name: Build & Scan Container Image

# This workflow demonstrates how to build
# a Docker image, and then scan the image
Expand All @@ -23,10 +23,10 @@ jobs:
- name: Checkout this repository
uses: actions/checkout@v4

- name: Set up docker build prereqs: QEMU
- name: Set up docker build prereqs (QEMU)
uses: docker/setup-qemu-action@v3

- name: Set up docker build prereqs: Buildx
- name: Set up docker build prereqs (Buildx)
uses: docker/setup-buildx-action@v3

- name: Build Docker image
Expand Down Expand Up @@ -80,9 +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"

0 comments on commit ac3c87c

Please sign in to comment.