From d4ba64e38381550ee3c1fed1c403fa9e234983de Mon Sep 17 00:00:00 2001 From: Zvonimir Pavlinovic Date: Wed, 17 Apr 2024 14:32:47 +0000 Subject: [PATCH] break two cases --- .github/actions/govulncheck/action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/govulncheck/action.yml b/.github/actions/govulncheck/action.yml index 0efb7dc..f5ff8eb 100644 --- a/.github/actions/govulncheck/action.yml +++ b/.github/actions/govulncheck/action.yml @@ -49,10 +49,11 @@ runs: - name: Install govulncheck run: go install golang.org/x/vuln/cmd/govulncheck@a7188c690e1d shell: bash - - name: Run govulncheck - id: govulncheck + - if: inputs.output-file == '' + name: Run govulncheck run: govulncheck -C ${{ inputs.work-dir }} -format ${{ inputs.output-format }} ${{ inputs.go-package }} shell: bash - if: inputs.output-file != '' + name: Run govulncheck with redirect + run: govulncheck -C ${{ inputs.work-dir }} -format ${{ inputs.output-format }} ${{ inputs.go-package }} > ${{ inputs.output-file }} shell: bash - run: echo ${{ steps.govulncheck.outputs.stdout }} > ${{ inputs.output-file }}