support building from remote bake definition

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-06-24 10:56:51 +02:00
parent 438d016327
commit bb2d1b0aab
6 changed files with 35 additions and 25 deletions

View File

@@ -18,6 +18,7 @@ export interface Inputs {
load: boolean;
push: boolean;
set: string[];
source: string;
}
export function tmpDir(): string {
@@ -40,7 +41,8 @@ export async function getInputs(): Promise<Inputs> {
pull: core.getBooleanInput('pull'),
load: core.getBooleanInput('load'),
push: core.getBooleanInput('push'),
set: getInputList('set', true)
set: getInputList('set', true),
source: core.getInput('source')
};
}
@@ -55,6 +57,9 @@ export async function getArgs(inputs: Inputs, buildxVersion: string): Promise<Ar
async function getBakeArgs(inputs: Inputs, buildxVersion: string): Promise<Array<string>> {
const args: Array<string> = ['bake'];
if (inputs.source) {
args.push(inputs.source);
}
await asyncForEach(inputs.files, async file => {
args.push('--file', file);
});