Skip to content

Commit

Permalink
Groupping docker pull logs
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 4, 2021
1 parent 9a04448 commit 2753c5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ async function dockerBuild(tag: string, args: string[]) {
// override entrypoint
dockerArgs.push('--entrypoint', '/bin/bash');
}

core.startGroup('Pull Docker image');
core.info(`Using ${image} Docker image`);
const exitCode = await exec.exec('docker', ['pull', image]);
if (exitCode != 0) {
throw `maturin: 'docker pull' returned ${exitCode}`;
}
core.endGroup();

const url = `https://github.com/PyO3/maturin/releases/download/${tag}/maturin-x86_64-unknown-linux-musl.tar.gz`;
const commands = [
Expand All @@ -102,7 +109,7 @@ async function dockerBuild(tag: string, args: string[]) {
'export PATH="$PATH:/opt/python/cp36-cp36m/bin:/opt/python/cp37-cp37m/bin:/opt/python/cp38-cp38/bin:/opt/python/cp39-cp39/bin"',
// Install maturin
'echo "::group::Install maturin"',
`curl -sqL ${url} | tar -xz -C /usr/local/bin`,
`curl -L ${url} | tar -xz -C /usr/local/bin`,
'echo "::endgroup::"',
];
const target = core.getInput('target');
Expand Down

0 comments on commit 2753c5f

Please sign in to comment.