Skip to content

Commit

Permalink
Display buildx version
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Dec 17, 2021
1 parent b7937ba commit e6bc7b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml
Expand Up @@ -38,14 +38,6 @@ jobs:
with:
version: ${{ matrix.buildx-version }}
standalone: ${{ matrix.standalone }}
-
name: Check version
run: |
if [ "${{ matrix.standalone }}" = "true" ]; then
buildx version
else
docker buildx version
fi
-
name: Inspect builder
run: |
Expand Down Expand Up @@ -376,14 +368,6 @@ jobs:
with:
version: https://github.com/docker/buildx.git#${{ matrix.ref }}
standalone: ${{ matrix.standalone }}
-
name: Check version
run: |
if [ "${{ matrix.standalone }}" = "true" ]; then
buildx version
else
docker buildx version
fi
-
name: Create Dockerfile
run: |
Expand Down
6 changes: 6 additions & 0 deletions dist/index.js

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

7 changes: 7 additions & 0 deletions src/main.ts
Expand Up @@ -37,6 +37,13 @@ async function run(): Promise<void> {
}

const buildxVersion = await buildx.getVersion(inputs.standalone);
await core.group(`Buildx version`, async () => {
const versionCmd = buildx.getCommand(['version'], inputs.standalone);
await exec.exec(versionCmd.commandLine, versionCmd.args, {
failOnStdErr: false
});
});

const builderName: string = inputs.driver == 'docker' ? 'default' : `builder-${require('uuid').v4()}`;
context.setOutput('name', builderName);
stateHelper.setBuilderName(builderName);
Expand Down

0 comments on commit e6bc7b7

Please sign in to comment.