Skip to content

Commit 1b5d19f

Browse files
authored
Merge pull request #16 from rom1K/main
Make output folder overridable
2 parents 931d0dd + 328f19e commit 1b5d19f

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
required: true
1212
format:
1313
required: true
14+
out:
15+
required: true
16+
default: 'reports'
17+
1418
args:
1519
required: false
1620
runs:
@@ -25,6 +29,6 @@ runs:
2529
- '--format'
2630
- '${{ inputs.format }}'
2731
- '--out'
28-
- '/github/workspace/reports'
32+
- '/github/workspace/${{ inputs.out }}'
2933
- '--noupdate'
3034
- ${{ inputs.args }}

readme.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ This action is based upon the OWASP Dependency-Check [tool](https://owasp.org/ww
99

1010
# How does it work?
1111

12-
The action receives three parameters: Project name, scanpath and report format, but more parameters can be added as optional.
12+
The action has three required parameters:
13+
14+
- `project`: the project name
15+
- `path`: the scanpath
16+
- `format`: the report format
17+
18+
Additionally, you can specify:
19+
20+
- `out`: the output folder location relative to the github workspace, by default it will be `reports`
21+
- `args`: any remaining flags and parameters to the binary, check the [arguments page](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html) for valid options
1322

1423
Example:
1524
```
@@ -31,7 +40,8 @@ jobs:
3140
with:
3241
project: 'test'
3342
path: '.'
34-
format: 'HTML'
43+
format: 'HTML'
44+
out: 'reports' # this is the default, no need to specify unless you wish to override it
3545
args: >
3646
--failOnCVSS 7
3747
--enableRetired
@@ -42,8 +52,6 @@ jobs:
4252
path: ${{github.workspace}}/reports
4353
```
4454

45-
*args* allows to pass established flags and parameters to the binary. Check the [arguments page](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html) for valid options
46-
4755
### Error: JAVA_HOME is not defined correctly
4856
When used in conjunction with the GitHub Action [setup-java](https://github.com/actions/setup-java) you will see the error `Error: JAVA_HOME is not defined correctly`
4957

0 commit comments

Comments
 (0)