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:
CrazyMax 2020-08-11 21:49:46 +02:00
parent 7e439a0132
commit b943609390
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
5 changed files with 27 additions and 35 deletions

15
setup-qemu/dist/index.js generated vendored
View file

@ -1011,19 +1011,10 @@ function run() {
core.setFailed('Only supported on linux platform');
return;
}
const qemuVer = core.getInput('qemu-version') || 'latest';
const image = core.getInput('image') || 'tonistiigi/binfmt:latest';
const platforms = core.getInput('platforms') || 'all';
core.info(`💎 Installing QEMU static binaries...`);
yield exec.exec('docker', [
'run',
'--rm',
'--privileged',
`multiarch/qemu-user-static:${qemuVer}`,
'--reset',
'-p',
'yes',
'--credential',
'yes'
]);
yield exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms]);
}
catch (error) {
core.setFailed(error.message);