Skip to content

Commit

Permalink
FIX: Always set a url (#24)
Browse files Browse the repository at this point in the history
* FIX: Always set a url

* FIX: Prop

* FIX: Build

* FIX: Name

* FIX: Build
  • Loading branch information
larsoner authored Mar 31, 2022
1 parent 736312a commit ba7de00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26264,7 +26264,13 @@ async function run() {
core.debug('Artifacts JSON:')
core.debug(artifacts)
// e.g., {"next_page_token":null,"items":[{"path":"test_artifacts/root_artifact.md","node_index":0,"url":"https://output.circle-artifacts.com/output/job/6fdfd148-31da-4a30-8e89-a20595696ca5/artifacts/0/test_artifacts/root_artifact.md"}]}
const url = artifacts.items[0].url.split('/artifacts/')[0] + '/artifacts/' + path
var url = '';
if (artifacts.items.length > 0) {
url = artifacts.items[0].url.split('/artifacts/')[0] + '/artifacts/' + path
}
else {
url = payload.target_url;
}
core.debug(`Linking to: ${url}`)
core.debug((new Date()).toTimeString())
core.setOutput("url", url)
Expand Down
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ async function run() {
core.debug('Artifacts JSON:')
core.debug(artifacts)
// e.g., {"next_page_token":null,"items":[{"path":"test_artifacts/root_artifact.md","node_index":0,"url":"https://output.circle-artifacts.com/output/job/6fdfd148-31da-4a30-8e89-a20595696ca5/artifacts/0/test_artifacts/root_artifact.md"}]}
const url = artifacts.items[0].url.split('/artifacts/')[0] + '/artifacts/' + path
var url = '';
if (artifacts.items.length > 0) {
url = artifacts.items[0].url.split('/artifacts/')[0] + '/artifacts/' + path
}
else {
url = payload.target_url;
}
core.debug(`Linking to: ${url}`)
core.debug((new Date()).toTimeString())
core.setOutput("url", url)
Expand Down

0 comments on commit ba7de00

Please sign in to comment.