Skip to content

Commit

Permalink
Merge pull request #1 from vouch-opensource/feature/add-working-direc…
Browse files Browse the repository at this point in the history
…tory

add optional option to specify working directory
  • Loading branch information
stijnopheide authored Jan 13, 2022
2 parents 7a2241d + ccf65ea commit 50b8136
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
java-version: '8'

- name: NVD Scan
uses: vouch-opensource/clojure-nvd-scan@v0.1
uses: vouch-opensource/clojure-nvd-scan@v0.2
with:
config-filename: '.nvd/config.json'
aliases: 'dev:main'
Expand All @@ -37,3 +37,18 @@ jobs:
### Configuration
Refer to [nvd-clojure configuration options](https://github.com/rm-hull/nvd-clojure#configuration-options). This github action uses the json configuration format.
### Working directory
In case you want to run the NVD scan in a different directory than the default GITHUB_WORKSPACE, you can specify the
`working-directory` option

```yml
- name: NVD Scan
uses: vouch-opensource/[email protected]
with:
working-directory: './cljs'
config-filename: '../.nvd/config.json'
```

Note that in case you also want to specify a config file, you have to provide a relative path from the working-directory.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: 'Clojure NVD Scan'
description: 'Scans a Clojure deps.edn project for vulnerabilities'
inputs:
working-directory:
description: 'Directory in which to execute the NVD scan'
required: false
config-filename:
description: 'Config file path'
required: false
Expand Down Expand Up @@ -51,4 +54,5 @@ runs:
- name: NVD Scan
run: clojure -Sdeps '{:deps {nvd-clojure/nvd-clojure {:mvn/version "${{ inputs.nvd-clojure-version }}"}}}' -M -m nvd.task.check ${{ inputs.config-filename }} "$(clojure -A:${{ inputs.aliases }} -Spath)"
working-directory: ${{ inputs.working-directory }}
shell: bash

0 comments on commit 50b8136

Please sign in to comment.