Skip to content

Commit 4fe005b

Browse files
committed
Add FOSSA test boolean input
1 parent 66670f3 commit 4fe005b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/reusable-dotnet-quality.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
type: boolean
2323
required: false
2424
default: false
25+
fossa-test:
26+
description: Run FOSSA test on PR
27+
type: boolean
28+
required: false
29+
default: false
2530
job-name:
2631
description: Job name
2732
type: string
@@ -134,10 +139,11 @@ jobs:
134139
id: fossa
135140
with:
136141
api-key: "${{ secrets.fossa-api-key }}"
137-
run-tests: ${{ github.event_name == 'pull_request' }}
138-
test-diff-revision: ${{ github.event.pull_request.base.sha }}
142+
run-tests: ${{ inputs.fossa-test && github.event_name == 'pull_request' }}
143+
test-diff-revision: ${{ github.event.pull_request.base.ref }}
139144
generate-report: html
140145
- run: echo '${{ steps.fossa.outputs.report }}' > report/fossa.html
146+
if: ${{ inputs.fossa-enabled }}
141147
- name: Generate SBOM with Syft
142148
uses: anchore/sbom-action@v0
143149
# with:
@@ -152,6 +158,7 @@ jobs:
152158
path: |
153159
./**/*test-result.xml
154160
./test/*/TestResults/*/coverage.cobertura.xml
161+
./**/failure_*.png*
155162
./**/SonarQube.xml
156163
./**/Summary.txt
157164
./**/fossa.html

0 commit comments

Comments
 (0)