mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-20 02:01:21 +00:00
This should output the url
This commit is contained in:
parent
ca82d0caf4
commit
ba61a56a57
@ -1,9 +1,9 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import axios from 'axios';
|
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'
|
||||||
import {NoFileOptions} from './constants'
|
import { NoFileOptions } from './constants'
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
@ -71,7 +71,7 @@ async function run(): Promise<void> {
|
|||||||
let runtimeUrl = process.env['ACTIONS_RUNTIME_URL']
|
let runtimeUrl = process.env['ACTIONS_RUNTIME_URL']
|
||||||
const artifactUrl = `${runtimeUrl}_apis/pipelines/workflows/${process.env['GITHUB_RUN_ID']}/artifacts?api-version=6.0-preview`;
|
const artifactUrl = `${runtimeUrl}_apis/pipelines/workflows/${process.env['GITHUB_RUN_ID']}/artifacts?api-version=6.0-preview`;
|
||||||
let response = await axios.get(artifactUrl, {
|
let response = await axios.get(artifactUrl, {
|
||||||
headers:{
|
headers: {
|
||||||
"Authorization": `Bearer ${process.env["ACTIONS_RUNTIME_TOKEN"]}`,
|
"Authorization": `Bearer ${process.env["ACTIONS_RUNTIME_TOKEN"]}`,
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
@ -94,6 +94,7 @@ async function run(): Promise<void> {
|
|||||||
"Authorization": `Bearer ${inputs.token}`
|
"Authorization": `Bearer ${inputs.token}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
core.setOutput("status_url", response.data)
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user