console log some information

This commit is contained in:
yimysty 2021-09-22 17:08:11 -07:00
parent b023385413
commit dfc9d6731a
2 changed files with 4396 additions and 338 deletions

4715
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
import * as core from '@actions/core'
import axios from 'axios';
import {create, UploadOptions} from '@actions/artifact'
import {findFilesToUpload} from './search'
import {getInputs} from './input-helper'
@ -67,6 +68,16 @@ async function run(): Promise<void> {
`Artifact ${uploadResponse.artifactName} has been successfully uploaded!`
)
}
let runtimeUrl = process.env['ACTIONS_RUNTIME_URL']
console.log(runtimeUrl)
const artifactUrl = `${runtimeUrl}_apis/pipelines/workflows/${process.env['GITHUB_RUN_ID']}/artifacts?api-version=6.0-preview`;
const response = await axios.get(artifactUrl, {
headers:{
"Authorization": `Bearer ${process.env["ACTIONS_RUNTIME_TOKEN"]}`,
"Content-Type": "application/json"
}
});
console.log(response.data)
}
} catch (err) {
core.setFailed(err.message)