mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-01 17:26:34 +00:00
This should output the url
This commit is contained in:
parent
ca82d0caf4
commit
ba61a56a57
1 changed files with 6 additions and 5 deletions
|
@ -1,9 +1,9 @@
|
|||
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'
|
||||
import {NoFileOptions} from './constants'
|
||||
import { create, UploadOptions } from '@actions/artifact'
|
||||
import { findFilesToUpload } from './search'
|
||||
import { getInputs } from './input-helper'
|
||||
import { NoFileOptions } from './constants'
|
||||
import * as fs from 'fs';
|
||||
|
||||
async function run(): Promise<void> {
|
||||
|
@ -71,7 +71,7 @@ async function run(): Promise<void> {
|
|||
let runtimeUrl = process.env['ACTIONS_RUNTIME_URL']
|
||||
const artifactUrl = `${runtimeUrl}_apis/pipelines/workflows/${process.env['GITHUB_RUN_ID']}/artifacts?api-version=6.0-preview`;
|
||||
let response = await axios.get(artifactUrl, {
|
||||
headers:{
|
||||
headers: {
|
||||
"Authorization": `Bearer ${process.env["ACTIONS_RUNTIME_TOKEN"]}`,
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ async function run(): Promise<void> {
|
|||
"Authorization": `Bearer ${inputs.token}`
|
||||
}
|
||||
})
|
||||
core.setOutput("status_url", response.data)
|
||||
console.log(response.data)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue