From bd67b584655bcb467c54dacf6c1ffc8a96757c44 Mon Sep 17 00:00:00 2001 From: Vishwajit Nagulkar <119565952+VishwajitNagulkar@users.noreply.github.com> Date: Wed, 4 Sep 2024 01:05:55 +0530 Subject: [PATCH] feat: added conditional paramter for blocking action (#151) --- .github/workflows/docker-scanner.yml | 5 +++++ 1 file changed, 5 insertions(+) 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 }}