mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-06-24 20:01:07 +02:00
switch back to uuid package
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import * as uuid from 'uuid';
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import {Docker} from '@docker/actions-toolkit/lib/docker/docker';
|
||||
@ -46,7 +47,7 @@ export async function getInputs(): Promise<Inputs> {
|
||||
}
|
||||
|
||||
export async function getBuilderName(driver: string): Promise<string> {
|
||||
return driver == 'docker' ? await Docker.context() : `builder-${crypto.randomUUID()}`;
|
||||
return driver == 'docker' ? await Docker.context() : `builder-${uuid.v4()}`;
|
||||
}
|
||||
|
||||
export async function getCreateArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
|
||||
@ -83,7 +84,7 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
|
||||
if (node.name) {
|
||||
args.push('--node', node.name);
|
||||
} else if (inputs.driver == 'kubernetes' && (await toolkit.buildx.versionSatisfies('<0.11.0'))) {
|
||||
args.push('--node', `node-${crypto.randomUUID()}`);
|
||||
args.push('--node', `node-${uuid.v4()}`);
|
||||
}
|
||||
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
|
||||
await Util.asyncForEach(node['driver-opts'], async (driverOpt: string) => {
|
||||
|
Reference in New Issue
Block a user