Skip to content

Commit bd67b58

Browse files
feat: added conditional paramter for blocking action (#151)
1 parent 0cb64bf commit bd67b58

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/docker-scanner.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
default: false
1717
type: string
1818
description: "Enable image scan report upload to GitHub Security tab."
19+
block_action:
20+
default: false
21+
type: string
22+
description: "Block github action if severity detected."
1923

2024
jobs:
2125
build-image:
@@ -60,6 +64,7 @@ jobs:
6064
sarif_file: 'trivy-results.sarif'
6165

6266
- name: Docker Scan with trivy (blocking)
67+
if: ${{ inputs.block_action == true }}
6368
uses: aquasecurity/trivy-action@master
6469
with:
6570
image-ref: ${{ github.sha }}

0 commit comments

Comments
 (0)