mirror of
https://github.com/actions/upload-artifact.git
synced 2025-04-22 19:11:21 +00:00
adjust return
This commit is contained in:
parent
846d13ffe4
commit
a52618175f
25
dist/index.js
vendored
25
dist/index.js
vendored
@ -5555,19 +5555,20 @@ function run() {
|
||||
console.log(`unsigned artifact url is ${unsignedUrl}`);
|
||||
if (!process.env.GITHUB_TOKEN) {
|
||||
console.log("missing github token");
|
||||
return;
|
||||
}
|
||||
response = yield axios_1.default.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
||||
artifact_url: unsignedUrl,
|
||||
pages_build_version: process.env['GITHUB_SHA']
|
||||
}, {
|
||||
headers: {
|
||||
"Accept": "application/vnd.github.v3+json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
|
||||
}
|
||||
});
|
||||
console.log(response.data);
|
||||
else {
|
||||
response = yield axios_1.default.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
||||
artifact_url: unsignedUrl,
|
||||
pages_build_version: process.env['GITHUB_SHA']
|
||||
}, {
|
||||
headers: {
|
||||
"Accept": "application/vnd.github.v3+json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
|
||||
}
|
||||
});
|
||||
console.log(response.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,19 +80,19 @@ async function run(): Promise<void> {
|
||||
console.log(`unsigned artifact url is ${unsignedUrl}`)
|
||||
if (!process.env.GITHUB_TOKEN) {
|
||||
console.log("missing github token")
|
||||
return
|
||||
} else {
|
||||
response = await axios.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
||||
artifact_url: unsignedUrl,
|
||||
pages_build_version: process.env['GITHUB_SHA']
|
||||
}, {
|
||||
headers: {
|
||||
"Accept": "application/vnd.github.v3+json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
|
||||
}
|
||||
})
|
||||
console.log(response.data)
|
||||
}
|
||||
response = await axios.post("https://api.github.com/repos/github/hub/pages/deployment", {
|
||||
artifact_url: unsignedUrl,
|
||||
pages_build_version: process.env['GITHUB_SHA']
|
||||
}, {
|
||||
headers: {
|
||||
"Accept": "application/vnd.github.v3+json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
|
||||
}
|
||||
})
|
||||
console.log(response.data)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user