builder: fix breaking change on node fields

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-02-24 19:41:10 +01:00
parent 2e59ae7030
commit 9128f56258
5 changed files with 31 additions and 36 deletions

View File

@@ -39,14 +39,14 @@ export class BuildKit {
}
public async getVersion(node: NodeInfo): Promise<string | undefined> {
if (!node.buildkitVersion && node.name) {
if (!node.buildkit && node.name) {
try {
return await this.getVersionWithinImage(node.name);
} catch (e) {
core.warning(e);
}
}
return node.buildkitVersion;
return node.buildkit;
}
private async getVersionWithinImage(nodeName: string): Promise<string> {
@@ -80,7 +80,7 @@ export class BuildKit {
builderInfo = await new Builder({buildx: this.buildx}).inspect(builderName);
}
for (const node of builderInfo.nodes) {
let bkversion = node.buildkitVersion;
let bkversion = node.buildkit;
core.debug(`BuildKit.versionSatisfies ${bkversion}: ${range}`);
if (!bkversion) {
try {