mirror of
https://gitea.com/actions/upload-artifact.git
synced 2025-04-22 16:55:32 +08:00
console log some information
This commit is contained in:
parent
b023385413
commit
dfc9d6731a
4703
dist/index.js
vendored
4703
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
|
import axios from 'axios';
|
||||||
import {create, UploadOptions} from '@actions/artifact'
|
import {create, UploadOptions} from '@actions/artifact'
|
||||||
import {findFilesToUpload} from './search'
|
import {findFilesToUpload} from './search'
|
||||||
import {getInputs} from './input-helper'
|
import {getInputs} from './input-helper'
|
||||||
@ -67,6 +68,16 @@ async function run(): Promise<void> {
|
|||||||
`Artifact ${uploadResponse.artifactName} has been successfully uploaded!`
|
`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) {
|
} catch (err) {
|
||||||
core.setFailed(err.message)
|
core.setFailed(err.message)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user