buildkit: fix debug logs for versionSatisfies

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-02-20 10:00:39 +01:00
parent a9ce06b57e
commit 62f8c6bef6
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

View File

@ -80,17 +80,17 @@ export class BuildKit {
builderInfo = await new Builder({buildx: this.buildx}).inspect(builderName);
}
for (const node of builderInfo.nodes) {
core.debug(`BuildKit.versionSatisfies ${node}: ${range}`);
let bkversion = node.buildkitVersion;
core.debug(`BuildKit.versionSatisfies ${bkversion}: ${range}`);
if (!bkversion) {
try {
bkversion = await this.getVersionWithinImage(node.name || '');
} catch (e) {
core.debug(`BuildKit.versionSatisfies ${node}: can't get version`);
core.debug(`BuildKit.versionSatisfies ${node.name}: can't get version`);
return false;
}
}
core.debug(`BuildKit.versionSatisfies ${node}: version ${bkversion}`);
core.debug(`BuildKit.versionSatisfies ${node.name}: version ${bkversion}`);
// BuildKit version reported by moby is in the format of `v0.11.0-moby`
if (builderInfo.driver == 'docker' && !bkversion.endsWith('-moby')) {
return false;