mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-26 22:26:08 +08:00
Merge pull request #81 from crazy-max/bake-workdir
bake: workdir support for parsing definitions
This commit is contained in:
commit
210b7421e4
@ -32,7 +32,7 @@ export class Bake {
|
||||
this.buildx = opts?.buildx || new Buildx();
|
||||
}
|
||||
|
||||
public async parseDefinitions(sources: Array<string>, targets: Array<string>): Promise<BakeDefinition> {
|
||||
public async parseDefinitions(sources: Array<string>, targets: Array<string>, workdir?: string): Promise<BakeDefinition> {
|
||||
const args = ['bake'];
|
||||
|
||||
let remoteDef;
|
||||
@ -58,6 +58,7 @@ export class Bake {
|
||||
|
||||
const printCmd = await this.buildx.getCommand([...args, '--print', ...targets]);
|
||||
return await Exec.getExecOutput(printCmd.command, printCmd.args, {
|
||||
cwd: workdir,
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
}).then(res => {
|
||||
|
Loading…
Reference in New Issue
Block a user