Skip to content

feat: Add token output and upgrade @actions/core to 1.11.1 #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ Parent project uuid in Dependency-Track (available in DT v4.8 and later)

**parentName is also required** Parent project version in Dependency-Track (available in DT v4.8 and later)

## Outputs

### `token`

`token` reponse from Dependency-Track server after SBOM file has been uploaded

## Example usage

With project name and version:
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ inputs:
parentversion:
description: 'Parent project version in Dependency-Track (available in DT v4.8 and later)'
required: false
outputs:
token:
description: 'The token response from Dependency-Track after SBOM file upload'
runs:
using: 'node20'
main: 'index.js'
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ async function run() {
const response = await fetch(url.toString(), requestOptions);

if (response.ok) {
const responseJson = await response.json();
const token = responseJson.token;
core.setOutput('token', token);
core.info('Finished uploading BOM to Dependency-Track server.');
} else {
const responseBody = await response.text();
Expand Down
1 change: 0 additions & 1 deletion node_modules/.bin/uuid

This file was deleted.

34 changes: 20 additions & 14 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

155 changes: 153 additions & 2 deletions node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions node_modules/@actions/core/lib/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@actions/core/lib/command.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions node_modules/@actions/core/lib/core.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading