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 6058310
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
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.

8 changes: 8 additions & 0 deletions src/main.ts
Expand Up @@ -6,6 +6,7 @@ import * as stateHelper from './state-helper';
import * as util from './util';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import {parseVersion} from './buildx';

async function run(): Promise<void> {
try {
Expand Down Expand Up @@ -37,6 +38,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 6058310

Please sign in to comment.