Select target architecture

This commit is contained in:
Mike Roberts 2020-10-26 22:29:54 +00:00
parent 2a34054303
commit 515c38e5e0
No known key found for this signature in database
GPG key ID: B68562622B45F745

10
main.js
View file

@ -22,6 +22,8 @@ async function getOS(distribution) {
async function main() { async function main() {
try { try {
const targetArchitecture = core.getInput("target_architecture") || "armhf"
const sourceRelativeDirectory = core.getInput("source_directory") || "./" const sourceRelativeDirectory = core.getInput("source_directory") || "./"
const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./" const artifactsRelativeDirectory = core.getInput("artifacts_directory") || "./"
@ -98,11 +100,11 @@ async function main() {
core.endGroup() core.endGroup()
} }
core.startGroup("Add armhf architecture") core.startGroup("Add target architecture")
await exec.exec("docker", [ await exec.exec("docker", [
"exec", "exec",
container, container,
"dpkg", "--add-architecture", "armhf" "dpkg", "--add-architecture", targetArchitecture
]) ])
core.endGroup() core.endGroup()
@ -118,7 +120,7 @@ async function main() {
await exec.exec("docker", [ await exec.exec("docker", [
"exec", "exec",
container, container,
"apt-get", "install", "--no-install-recommends", "-y", "dpkg-dev", "debhelper", "devscripts", "equivs", "libpython3.7-minimal:armhf" "apt-get", "install", "--no-install-recommends", "-y", "dpkg-dev", "debhelper", "devscripts", "equivs", "libpython3.7-minimal:" + targetArchitecture
]) ])
core.endGroup() core.endGroup()
@ -134,7 +136,7 @@ async function main() {
await exec.exec("docker", [ await exec.exec("docker", [
"exec", "exec",
container, container,
"dpkg-buildpackage", "--no-sign", "-d", "-aarmhf" "dpkg-buildpackage", "--no-sign", "-d", "-a" + targetArchitecture
]) ])
core.endGroup() core.endGroup()