1
0
Fork 0
mirror of https://github.com/docker/setup-buildx-action.git synced 2024-11-22 08:54:57 +00:00

set node name for k8s driver when appending nodes

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-03-10 19:33:52 +01:00
parent 95cefc3c57
commit fc1a41d2e5
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7

View file

@ -78,6 +78,8 @@ export async function getAppendArgs(inputs: Inputs, node: Node, toolkit: Toolkit
const args: Array<string> = ['create', '--name', inputs.name, '--append']; const args: Array<string> = ['create', '--name', inputs.name, '--append'];
if (node.name) { if (node.name) {
args.push('--node', node.name); args.push('--node', node.name);
} else if (inputs.driver == 'kubernetes' && (await toolkit.buildx.versionSatisfies('<0.11.0'))) {
args.push('--node', `node-${uuid.v4()}`);
} }
if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) { if (node['driver-opts'] && (await toolkit.buildx.versionSatisfies('>=0.3.0'))) {
await Util.asyncForEach(node['driver-opts'], async driverOpt => { await Util.asyncForEach(node['driver-opts'], async driverOpt => {