Skip to content

Commit

Permalink
Disable Trivy by default
Browse files Browse the repository at this point in the history
Adds an input flag `enableSecurityScan` that is false by default and will only include the scan job if set to true.
  • Loading branch information
corneil committed Nov 14, 2024
1 parent 464868b commit 5b41ad1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: CI

on:
workflow_dispatch:
inputs:
enableSecurityScan:
type: boolean
default: false
description: 'Enable security scan with Trivy'
push:
branches:
- 'main'
Expand Down Expand Up @@ -172,6 +177,7 @@ jobs:
secrets: inherit
scan:
runs-on: ubuntu-latest
if: ${{ inputs.enableSecurityScan != null && inputs.enableSecurityScan }}
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in repo mode
Expand Down

0 comments on commit 5b41ad1

Please sign in to comment.