try not to fail the tests, add an option instead
This commit is contained in:
parent
c74ec7fd4f
commit
c27c931c3e
|
@ -19,6 +19,9 @@ inputs:
|
||||||
os_distribution:
|
os_distribution:
|
||||||
description: OS distribution name, value from `debian/changelog` is used if not defined
|
description: OS distribution name, value from `debian/changelog` is used if not defined
|
||||||
required: false
|
required: false
|
||||||
|
target_release:
|
||||||
|
description: additional releases (buster-security, buster-backports, etc), space-separated
|
||||||
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: node12
|
using: node12
|
||||||
main: main.js
|
main: main.js
|
||||||
|
|
13
main.js
13
main.js
|
@ -32,7 +32,6 @@ 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 extraPackages = core.getInput("extra_packages").split(' ') || []
|
|
||||||
|
|
||||||
const workspaceDirectory = process.cwd()
|
const workspaceDirectory = process.cwd()
|
||||||
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
const sourceDirectory = path.join(workspaceDirectory, sourceRelativeDirectory)
|
||||||
|
@ -50,6 +49,8 @@ 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")
|
||||||
|
@ -62,7 +63,7 @@ async function main() {
|
||||||
arch: cpuArchitecture,
|
arch: cpuArchitecture,
|
||||||
image: image,
|
image: image,
|
||||||
container: container,
|
container: container,
|
||||||
extraPackages: extraPackages,
|
targetReleases: targetReleases,
|
||||||
workspaceDirectory: workspaceDirectory,
|
workspaceDirectory: workspaceDirectory,
|
||||||
sourceDirectory: sourceDirectory,
|
sourceDirectory: sourceDirectory,
|
||||||
buildDirectory: buildDirectory,
|
buildDirectory: buildDirectory,
|
||||||
|
@ -128,7 +129,7 @@ async function main() {
|
||||||
await exec.exec("docker", [
|
await exec.exec("docker", [
|
||||||
"exec",
|
"exec",
|
||||||
container,
|
container,
|
||||||
"apt-get", "install", "-yq", "dpkg-dev", "debhelper", "devscripts"
|
"apt-get", "install", "-yq", "-t", imageTag, "dpkg-dev", "debhelper", "devscripts"
|
||||||
])
|
])
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|
||||||
|
@ -137,8 +138,10 @@ async function main() {
|
||||||
await exec.exec("docker", [
|
await exec.exec("docker", [
|
||||||
"exec",
|
"exec",
|
||||||
container,
|
container,
|
||||||
"apt-get", "build-dep", "-yq", sourceDirectory
|
"apt-get", "build-dep", "-yq", "-t", imageTag
|
||||||
])
|
].concat(Array.prototype.concat(targetReleases.map(function (item) {
|
||||||
|
return ["-t", item]
|
||||||
|
}))).concat(sourceDirectory))
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue