Skip to content

Commit

Permalink
feat: added conditional paramter for blocking action (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
VishwajitNagulkar authored Sep 3, 2024
1 parent 0cb64bf commit bd67b58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/docker-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
default: false
type: string
description: "Enable image scan report upload to GitHub Security tab."
block_action:
default: false
type: string
description: "Block github action if severity detected."

jobs:
build-image:
Expand Down Expand Up @@ -60,6 +64,7 @@ jobs:
sarif_file: 'trivy-results.sarif'

- name: Docker Scan with trivy (blocking)
if: ${{ inputs.block_action == true }}
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ github.sha }}
Expand Down

0 comments on commit bd67b58

Please sign in to comment.