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 Apr 12, 2022
1 parent f512a10 commit ee201e2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 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
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/main.ts
Expand Up @@ -38,8 +38,14 @@ async function run(): Promise<void> {
}

const buildxVersion = await buildx.getVersion(inputs.standalone);
const builderName: string = inputs.driver == 'docker' ? 'default' : `builder-${uuid.v4()}`;
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-${uuid.v4()}`;
context.setOutput('name', builderName);
stateHelper.setBuilderName(builderName);

Expand Down

0 comments on commit ee201e2

Please sign in to comment.