Skip to content

Commit 9aa645c

Browse files
author
Corneil du Plessis
authored
Disable Trivy by default
Adds an input flag `enableSecurityScan` that is false by default and will only include the scan job if set to true.
1 parent 464868b commit 9aa645c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: CI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
enableSecurityScan:
7+
type: boolean
8+
default: false
9+
description: 'Enable security scan with Trivy'
510
push:
611
branches:
712
- 'main'
@@ -172,6 +177,7 @@ jobs:
172177
secrets: inherit
173178
scan:
174179
runs-on: ubuntu-latest
180+
if: ${{ inputs.enableSecurityScan != null && inputs.enableSecurityScan }}
175181
steps:
176182
- uses: actions/checkout@v4
177183
- name: Run Trivy vulnerability scanner in repo mode

0 commit comments

Comments
 (0)