diff --git a/action.yml.oldbash b/action.yml.oldbash index a9c763b..33ea983 100644 --- a/action.yml.oldbash +++ b/action.yml.oldbash @@ -80,7 +80,7 @@ inputs: description: "" default: "1" - docker_arch_list: + docker_multiarch: description: "if set to true use linux/amd64,linux/arm64, otherwise specifiy arch list manually" default: "false" diff --git a/dist/index.js b/dist/index.js index 11b4252..47fed43 100644 --- a/dist/index.js +++ b/dist/index.js @@ -62251,15 +62251,17 @@ function prepareDockerArgs(destinations) { dockerArgs.unshift(getDockerContextDir()); - if (isNonEmptyStr(core.getInput('docker_arch_list'))) { + if (isNonEmptyStr(core.getInput('docker_multiarch'))) { if (!core.getBooleanInput('use_buildx')) { throw new Error('Unsupported configuration: Cannot build multiarch without enabling buildx'); } - let archList = (core.getInput('docker_arch_list')); + let archList = (core.getInput('docker_multiarch')); if (archList === 'true' || archList === '1') { archList = 'linux/amd64,linux/arm64'; } - dockerArgs.push('--platform ' + archList); + if (archList.length > 0) { + dockerArgs.push('--platform ' + archList); + } } if (core.getBooleanInput('squash_layers')) { diff --git a/src/lib.js b/src/lib.js index 0f024bb..2b64e61 100644 --- a/src/lib.js +++ b/src/lib.js @@ -149,15 +149,17 @@ export function prepareDockerArgs(destinations) { dockerArgs.unshift(getDockerContextDir()); - if (isNonEmptyStr(core.getInput('docker_arch_list'))) { + if (isNonEmptyStr(core.getInput('docker_multiarch'))) { if (!core.getBooleanInput('use_buildx')) { throw new Error('Unsupported configuration: Cannot build multiarch without enabling buildx'); } - let archList = (core.getInput('docker_arch_list')); + let archList = (core.getInput('docker_multiarch')); if (archList === 'true' || archList === '1') { archList = 'linux/amd64,linux/arm64'; } - dockerArgs.push('--platform ' + archList); + if (archList.length > 0) { + dockerArgs.push('--platform ' + archList); + } } if (core.getBooleanInput('squash_layers')) {