This action provides support for creating Black Duck reports. Currently, it supports the following types:
- Software Bill of Materials (SBOM)
- License Reports
Software Bill of Materials (SBOM) reports can be generated in the following formats:
- SPDX v2.2
- SPDX v2.3
- CycloneDX v1.3
- CycloneDX v1.4
License reports can be generated in the following formats:
- JSON
- TEXT
All notable changes to this project are documented in CHANGELOG.md
.
on:
push:
tags:
- '*'
jobs:
create-report:
name: Create Black Duck report
runs-on: ubuntu-latest
steps:
- name: Create Black Duck report
uses: tvcsantos/blackduck-report-action@v2
with:
blackduck-url: ${{ vars.BLACKDUCK_URL }}
blackduck-token: ${{ secrets.BLACKDUCK_API_TOKEN }}
In the example above we are using the action to create a Black Duck report for the current repository on push to any tag. First we checkout our code, then we run this action.
blackduck-url
- Black Duck instance URL.blackduck-token
- Authentication token for a user, to scan your project.
blackduck-token
should be kept as secret and not exposed in plain text in your action. Also, we can
benefit from variables to avoid having blackduck-url
in plain text and promote re-usability of the above workflow in
our pipelines later.
In the example above blackduck-token
is provided via the secret BLACKDUCK_API_TOKEN
, that must be defined either in
your project repository or shared at organization level. With respect to blackduck-url
it is provided via the variable
BLACKDUCK_URL
that must be defined either in your repository variables or shared at organization level.
For more details on the values for these secrets and variables please check Inputs section.
Input | Type | Required | Default Value | Description |
---|---|---|---|---|
blackduck-url |
String | Yes | - | Black Duck instance URL. |
blackduck-token |
String | Yes | - | Black Duck API token. |
output-directory |
String | No | ./blackduck-report |
Path to the directory where the report will be saved. |
project-name |
String | No | ${{ github.repository }} |
Project name in Black Duck. |
project-version |
String | No | ${{ github.ref_name }} |
Project version in Black Duck. |
report-format |
String | No | JSON |
Report format depending on report-type. The following values are supported:
|
report-type |
String | No | SPDX_23 |
Report type. The following values are supported:
|
Output | Type | Description |
---|---|---|
report-file-path |
String | Path to the generated report file. |
This project is released under MIT License.
Contributions are welcome! See Contributor's Guide.