Skip to content

Commit

Permalink
Fix platforms extraction
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
CrazyMax committed Aug 12, 2020
1 parent 4522dd9 commit 1886d93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions setup-qemu/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions setup-qemu/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ 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).then(res => {
await exec.exec('docker', ['run', '--rm', '--privileged', image, '--install', platforms], false);

core.info('🛒 Extracting available platforms...');
await exec.exec(`docker`, ['run', '--rm', '--privileged', image], false).then(res => {
if (res.stderr != '' && !res.success) {
throw new Error(res.stderr);
}

core.info('🛒 Extracting available platforms...');
const platforms: Platforms = JSON.parse(res.stdout.trim());
core.setOutput('platforms', platforms.supported.join(','));
});
Expand Down

0 comments on commit 1886d93

Please sign in to comment.