-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from philips-software/develop
Add support for mode 'tree' and 'blackduck'
- Loading branch information
Showing
2 changed files
with
197 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,11 +30,19 @@ Get SPDX license overview | |
| parameter | description | required | default | | ||
| - | - | - | - | | ||
| project | project | `true` | spdx-builder | | ||
| spdx-builder-version | spdx-builder-version | `true` | v0.6.0 | | ||
| ort-version | philipssoftware/ort version | `false` | 2021-05-31 | | ||
| ort-file | Specifies an ort-file to override ORT scanning in this action. | `true` | | | ||
| spdx-builder-version | spdx-builder-version | `true` | v0.7.0 | | ||
| mode | Scan mode. Can be 'ort', 'blackduck' or 'tree' | `true` | ort | | ||
| scanner-url | scanner-url (license-scanner) | `false` | | | ||
| bombase-url | bombase-url (in case of mode: 'tree') | `false` | | | ||
| upload-url | upload-url (f.e. BOM-bar) | `false` | | | ||
| ort-version | philipssoftware/ort version (in case of mode: 'ort') | `false` | 2021-05-31 | | ||
| ort-file | Specifies an ort-file to override ORT scanning in this action. (in case of mode: 'ort') | `false` | | | ||
| tree | file with tree input (in case of mode: 'tree') | `false` | | | ||
| format | format input (in case of mode: 'tree') | `false` | | | ||
| blackduck-url | Blackduck url (in case of mode: 'blackduck') | `false` | | | ||
| blackduck-token | Blackduck token (in case of mode: 'blackduck') | `false` | | | ||
| blackduck-project | Blackduck project (in case of mode: 'blackduck') | `false` | | | ||
| blackduck-version | Blackduck version (in case of mode: 'blackduck') | `false` | | | ||
|
||
|
||
|
||
|
@@ -62,6 +70,51 @@ This action is an `composite` action. | |
|
||
## GitHub workflow | ||
|
||
Make sure you have a proper `.spdx-builder.yml` file in your project. | ||
|
||
### `ORT` mode | ||
```yml | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11.0.1' | ||
- name: Create spdx-file | ||
id: spdx-builder | ||
uses: philips-software/[email protected] | ||
with: | ||
project: my-project | ||
mode: ort | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: licenses | ||
path: ${{ steps.spdx-builder.outputs.spdx-file }} | ||
``` | ||
### `tree` mode | ||
```yml | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11.0.1' | ||
- name: Create tree | ||
run: | | ||
npm list --all --production > npm-dependencies.txt | ||
- name: Create spdx-file | ||
id: spdx-builder | ||
uses: philips-software/[email protected] | ||
with: | ||
project: my-project | ||
mode: 'tree' | ||
tree: 'npm-dependencies.txt' | ||
format: 'npm' | ||
bombase-url: <bombase-url> # Optional | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: licenses | ||
path: ${{ steps.spdx-builder.outputs.spdx-file }} | ||
``` | ||
|
||
### `blackduck` mode | ||
```yml | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v1 | ||
|
@@ -72,6 +125,11 @@ This action is an `composite` action. | |
uses: philips-software/[email protected] | ||
with: | ||
project: my-project | ||
mode: 'blackduck' | ||
blackduck-url: <blackduck-url> | ||
blackduck-token: ${{ secrets.BLACKDUCK_TOKEN }} | ||
blackduck-project: <project-name> | ||
blackduck-version: <project-version> | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: licenses | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters