Skip to content

Commit 9dadc6b

Browse files
committed
Fix blackduck scans to only ever run on merges
Downstream users should say whether or not they want this, but currently they have to work around this and use conditionals. Move the conditional here we know they have to have, so they can go back to enabling it properly. Signed-off-by: Phil Dibowitz <phil@ipom.com>
1 parent 5649cae commit 9dadc6b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci-main-pull-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ jobs:
13001300

13011301
BlackDuck-Polaris-SAST:
13021302
name: 'BlackDuck Polaris SAST scan'
1303-
if: ${{ inputs.perform-blackduck-polaris }}
1303+
if: ${{ inputs.perform-blackduck-polaris && github.event_name == 'push' }}}
13041304
uses: chef/common-github-actions/.github/workflows/polaris-sast.yml@main
13051305
needs: checkout
13061306
secrets: inherit
@@ -1576,7 +1576,7 @@ jobs:
15761576
github-branch-name: ${{ inputs.github-branch-name }}
15771577
version: ${{ inputs.version }}
15781578
export-github-sbom: ${{ inputs.export-github-sbom }}
1579-
perform-blackduck-sca-scan: ${{ inputs.perform-blackduck-sca-scan }}
1579+
perform-blackduck-sca-scan: ${{ inputs.perform-blackduck-sca-scan && github.event_name == 'push' }}}
15801580
# generate-blackduck-sbom: ${{ inputs.generate-blackduck-sbom }} # obsolete, remove TODO
15811581
blackduck-project-group-name: ${{ inputs.blackduck-project-group-name }}
15821582
blackduck-project-name: ${{ inputs.blackduck-project-name }}

0 commit comments

Comments
 (0)