mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-20 09:36:46 +00:00
adjust return
This commit is contained in:
parent
846d13ffe4
commit
a52618175f
2 changed files with 25 additions and 24 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -5555,8 +5555,8 @@ function run() {
|
||||||
console.log(`unsigned artifact url is ${unsignedUrl}`);
|
console.log(`unsigned artifact url is ${unsignedUrl}`);
|
||||||
if (!process.env.GITHUB_TOKEN) {
|
if (!process.env.GITHUB_TOKEN) {
|
||||||
console.log("missing github token");
|
console.log("missing github token");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
response = yield axios_1.default.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
response = yield axios_1.default.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
||||||
artifact_url: unsignedUrl,
|
artifact_url: unsignedUrl,
|
||||||
pages_build_version: process.env['GITHUB_SHA']
|
pages_build_version: process.env['GITHUB_SHA']
|
||||||
|
@ -5571,6 +5571,7 @@ function run() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.setFailed(err.message);
|
core.setFailed(err.message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,8 +80,7 @@ async function run(): Promise<void> {
|
||||||
console.log(`unsigned artifact url is ${unsignedUrl}`)
|
console.log(`unsigned artifact url is ${unsignedUrl}`)
|
||||||
if (!process.env.GITHUB_TOKEN) {
|
if (!process.env.GITHUB_TOKEN) {
|
||||||
console.log("missing github token")
|
console.log("missing github token")
|
||||||
return
|
} else {
|
||||||
}
|
|
||||||
response = await axios.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
response = await axios.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
||||||
artifact_url: unsignedUrl,
|
artifact_url: unsignedUrl,
|
||||||
pages_build_version: process.env['GITHUB_SHA']
|
pages_build_version: process.env['GITHUB_SHA']
|
||||||
|
@ -95,6 +94,7 @@ async function run(): Promise<void> {
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.setFailed(err.message)
|
core.setFailed(err.message)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue