1
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2025-05-07 22:19:29 +02:00

Fix and cleanup of v2 setup actions

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-08-16 04:10:09 +02:00
parent 3f08c86128
commit e9cb922263
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
19 changed files with 66 additions and 3827 deletions

View file

@ -1,6 +1,7 @@
import * as os from 'os';
import * as mexec from './exec';
import * as core from '@actions/core';
import * as exec from './exec';
import * as exec from '@actions/exec';
interface Platforms {
supported: string[];
@ -18,10 +19,10 @@ async function run(): Promise<void> {
const platforms: string = core.getInput('platforms') || 'all';
core.info(`💎 Installing QEMU static binaries...`);
await exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms], false);
await exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms]);
core.info('🛒 Extracting available platforms...');
await exec.exec(`docker`, ['run', '--rm', '--privileged', image], true).then(res => {
await mexec.exec(`docker`, ['run', '--rm', '--privileged', image], true).then(res => {
if (res.stderr != '' && !res.success) {
throw new Error(res.stderr);
}