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 856340e commit 1f88cb3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Expand Up @@ -39,13 +39,10 @@ jobs:
version: ${{ matrix.buildx-version }}
standalone: ${{ matrix.standalone }}
-
name: Check version
name: Check available in path
if: matrix.standalone
run: |
if [ "${{ matrix.standalone }}" = "true" ]; then
buildx version
else
docker buildx version
fi
buildx version
-
name: Inspect builder
run: |
Expand Down Expand Up @@ -377,13 +374,10 @@ jobs:
version: https://github.com/docker/buildx.git#${{ matrix.ref }}
standalone: ${{ matrix.standalone }}
-
name: Check version
name: Check available in path
if: matrix.standalone
run: |
if [ "${{ matrix.standalone }}" = "true" ]; then
buildx version
else
docker buildx version
fi
buildx version
-
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 1f88cb3

Please sign in to comment.