handle empty string
This commit is contained in:
parent
599fe95661
commit
8260bd8e4c
5
main.js
5
main.js
|
@ -33,6 +33,7 @@ async function main() {
|
||||||
const sourceRelativeDirectory = core.getInput("source_directory") || "./"
|
const sourceRelativeDirectory = core.getInput("source_directory") || "./"
|
||||||
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
|
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
|
||||||
const osDistribution = core.getInput("os_distribution") || ""
|
const osDistribution = core.getInput("os_distribution") || ""
|
||||||
|
const targetReleases = core.getInput("target_releases") || ""
|
||||||
|
|
||||||
const workspaceDirectory = process.cwd()
|
const workspaceDirectory = process.cwd()
|
||||||
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
||||||
|
@ -50,8 +51,6 @@ async function main() {
|
||||||
const container = pkg
|
const container = pkg
|
||||||
const image = imageName + ":" + imageTag
|
const image = imageName + ":" + imageTag
|
||||||
|
|
||||||
const targetReleases = core.getInput("target_releases").split(' ') || [ imageTag ]
|
|
||||||
|
|
||||||
fs.mkdirSync(artifactsDirectory, { recursive: true })
|
fs.mkdirSync(artifactsDirectory, { recursive: true })
|
||||||
|
|
||||||
core.startGroup("Print details")
|
core.startGroup("Print details")
|
||||||
|
@ -136,7 +135,7 @@ async function main() {
|
||||||
|
|
||||||
if (imageTag != "trusty") {
|
if (imageTag != "trusty") {
|
||||||
core.startGroup("Install build dependencies")
|
core.startGroup("Install build dependencies")
|
||||||
releases = Array.prototype.concat(targetReleases.map(function (item) {
|
releases = Array.prototype.concat(targetReleases.split(" ").map(function (item) {
|
||||||
return ["-t", item]
|
return ["-t", item]
|
||||||
}))
|
}))
|
||||||
console.log(targetReleases)
|
console.log(targetReleases)
|
||||||
|
|
Loading…
Reference in a new issue