Skip to content

Commit ee5ece3

Browse files
committed
ci: add workflow_dispatch
1 parent 4a517b5 commit ee5ece3

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/security.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on: # yamllint disable-line rule:truthy
66
push:
77
branches:
88
- main
9+
workflow_dispatch:
10+
inputs:
11+
security-type:
12+
description: What Security scanning you would like to run?
13+
required: false
14+
default: "all"
15+
type: choice
16+
options: ["all", "sca", "code-scanning", "image"]
917

1018
jobs:
1119
build-image:
@@ -45,7 +53,7 @@ jobs:
4553
security-events: write
4654
uses: fabasoad/reusable-workflows/.github/workflows/wf-security-sast.yml@main
4755
with:
48-
code-scanning: true
49-
image: true
56+
code-scanning: ${{ (inputs.security-type || 'all') == 'all' || inputs.security-type == 'code-scanning' }}
57+
image: ${{ (inputs.security-type || 'all') == 'all' || inputs.security-type == 'image' }}
5058
image-artifact-name: "${{ needs.build-image.outputs.artifact-name }}"
51-
sca: true
59+
sca: ${{ (inputs.security-type || 'all') == 'all' || inputs.security-type == 'sca' }}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,7 @@ jobs:
6060
Run echo "Hello World!"
6161
Hello World!
6262
```
63+
64+
## Contributions
65+
66+
![Alt](https://repobeats.axiom.co/api/embed/c243117fc32fc6c2d68502024a4bb56e0d1f792d.svg "Repobeats analytics image")

0 commit comments

Comments
 (0)