support multi arch build

This commit is contained in:
2023-12-02 22:11:59 +01:00
parent 56f48b78ce
commit 5aa14d4bca
3 changed files with 11 additions and 7 deletions
+5 -3
View File
@@ -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')) {