mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-05-10 08:29:30 +02:00
chore: update dev dependencies and workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c62171c994
commit
2e23606dc9
21 changed files with 2134 additions and 16276 deletions
|
@ -1,5 +1,6 @@
|
|||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as uuid from 'uuid';
|
||||
import * as buildx from './buildx';
|
||||
import * as context from './context';
|
||||
import * as stateHelper from './state-helper';
|
||||
|
@ -28,13 +29,13 @@ async function run(): Promise<void> {
|
|||
}
|
||||
|
||||
const buildxVersion = await buildx.getVersion();
|
||||
const builderName: string = inputs.driver == 'docker' ? 'default' : `builder-${require('uuid').v4()}`;
|
||||
const builderName: string = inputs.driver == 'docker' ? 'default' : `builder-${uuid.v4()}`;
|
||||
context.setOutput('name', builderName);
|
||||
stateHelper.setBuilderName(builderName);
|
||||
|
||||
if (inputs.driver !== 'docker') {
|
||||
core.startGroup(`Creating a new builder instance`);
|
||||
let createArgs: Array<string> = ['buildx', 'create', '--name', builderName, '--driver', inputs.driver];
|
||||
const createArgs: Array<string> = ['buildx', 'create', '--name', builderName, '--driver', inputs.driver];
|
||||
if (buildx.satisfies(buildxVersion, '>=0.3.0')) {
|
||||
await context.asyncForEach(inputs.driverOpts, async driverOpt => {
|
||||
createArgs.push('--driver-opt', driverOpt);
|
||||
|
@ -58,7 +59,7 @@ async function run(): Promise<void> {
|
|||
core.endGroup();
|
||||
|
||||
core.startGroup(`Booting builder`);
|
||||
let bootstrapArgs: Array<string> = ['buildx', 'inspect', '--bootstrap'];
|
||||
const bootstrapArgs: Array<string> = ['buildx', 'inspect', '--bootstrap'];
|
||||
if (buildx.satisfies(buildxVersion, '>=0.4.0')) {
|
||||
bootstrapArgs.push('--builder', builderName);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue