mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-23 03:26:46 +00:00
Switch to tonistiigi/binfmt
Add platforms input to choose what platforms to install Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
7e439a0132
commit
b943609390
5 changed files with 27 additions and 35 deletions
|
@ -9,20 +9,11 @@ async function run(): Promise<void> {
|
|||
return;
|
||||
}
|
||||
|
||||
const qemuVer: string = core.getInput('qemu-version') || 'latest';
|
||||
const image: string = core.getInput('image') || 'tonistiigi/binfmt:latest';
|
||||
const platforms: string = core.getInput('platforms') || 'all';
|
||||
|
||||
core.info(`💎 Installing QEMU static binaries...`);
|
||||
await exec.exec('docker', [
|
||||
'run',
|
||||
'--rm',
|
||||
'--privileged',
|
||||
`multiarch/qemu-user-static:${qemuVer}`,
|
||||
'--reset',
|
||||
'-p',
|
||||
'yes',
|
||||
'--credential',
|
||||
'yes'
|
||||
]);
|
||||
await exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms]);
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue