diff --git a/.github/workflows/docker-scanner.yml b/.github/workflows/docker-scanner.yml index 967f755..4b0322b 100644 --- a/.github/workflows/docker-scanner.yml +++ b/.github/workflows/docker-scanner.yml @@ -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: @@ -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 }}