mirror of
https://github.com/docker/setup-buildx-action.git
synced 2024-11-25 15:50:57 -05:00
return driver opts and buildkit version from nodes metadata
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
aa0df6f73a
commit
69d3837448
1 changed files with 10 additions and 0 deletions
|
@ -18,8 +18,10 @@ export type Builder = {
|
||||||
export type Node = {
|
export type Node = {
|
||||||
name?: string;
|
name?: string;
|
||||||
endpoint?: string;
|
endpoint?: string;
|
||||||
|
'driver-opts'?: Array<string>;
|
||||||
status?: string;
|
status?: string;
|
||||||
'buildkitd-flags'?: string;
|
'buildkitd-flags'?: string;
|
||||||
|
buildkit?: string;
|
||||||
platforms?: string;
|
platforms?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,6 +135,10 @@ export async function inspect(name: string, standalone?: boolean): Promise<Build
|
||||||
node.endpoint = value;
|
node.endpoint = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'driver options': {
|
||||||
|
node['driver-opts'] = (value.match(/(\w+)="([^"]*)"/g) || []).map(v => v.replace(/^(.*)="(.*)"$/g, '$1=$2'));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'status': {
|
case 'status': {
|
||||||
node.status = value;
|
node.status = value;
|
||||||
break;
|
break;
|
||||||
|
@ -141,6 +147,10 @@ export async function inspect(name: string, standalone?: boolean): Promise<Build
|
||||||
node['buildkitd-flags'] = value;
|
node['buildkitd-flags'] = value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'buildkit': {
|
||||||
|
node.buildkit = value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'platforms': {
|
case 'platforms': {
|
||||||
let platforms: Array<string> = [];
|
let platforms: Array<string> = [];
|
||||||
// if a preferred platform is being set then use only these
|
// if a preferred platform is being set then use only these
|
||||||
|
|
Loading…
Reference in a new issue