mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-23 03:16:09 +08:00
buildx: expose methods
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
fdc8b5d37b
commit
14581244a3
@ -22,6 +22,14 @@ export class BuildKit {
|
||||
this.buildx = opts?.buildx || new Buildx();
|
||||
}
|
||||
|
||||
public tmpDir() {
|
||||
return this.tmpdir;
|
||||
}
|
||||
|
||||
public tmpName(options?: tmp.TmpNameOptions): string {
|
||||
return tmp.tmpNameSync(options);
|
||||
}
|
||||
|
||||
private async getBuilderInfo(name: string): Promise<BuilderInfo> {
|
||||
const builder = new Builder({buildx: this.buildx});
|
||||
return builder.inspect(name);
|
||||
@ -114,12 +122,4 @@ export class BuildKit {
|
||||
fs.writeFileSync(configFile, s);
|
||||
return configFile;
|
||||
}
|
||||
|
||||
private tmpDir() {
|
||||
return this.tmpdir;
|
||||
}
|
||||
|
||||
private tmpName(options?: tmp.TmpNameOptions): string {
|
||||
return tmp.tmpNameSync(options);
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,14 @@ export class Buildx {
|
||||
this.version = this.getVersion();
|
||||
}
|
||||
|
||||
public tmpDir() {
|
||||
return this.tmpdir;
|
||||
}
|
||||
|
||||
public tmpName(options?: tmp.TmpNameOptions): string {
|
||||
return tmp.tmpNameSync(options);
|
||||
}
|
||||
|
||||
public getCommand(args: Array<string>) {
|
||||
return {
|
||||
command: this.standalone ? 'buildx' : 'docker',
|
||||
@ -179,12 +187,4 @@ export class Buildx {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private tmpDir() {
|
||||
return this.tmpdir;
|
||||
}
|
||||
|
||||
private tmpName(options?: tmp.TmpNameOptions): string {
|
||||
return tmp.tmpNameSync(options);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user