mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-21 10:46:45 +00:00
Remove bake support for now (future release or subaction)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
e7964906a6
commit
2962fe9789
9 changed files with 60 additions and 995 deletions
|
@ -18,9 +18,6 @@ export interface Inputs {
|
|||
cacheFrom: string[];
|
||||
cacheTo: string[];
|
||||
cacheGithub: boolean;
|
||||
bake: boolean;
|
||||
bakeFiles: string[];
|
||||
bakeTargets: string[];
|
||||
}
|
||||
|
||||
export async function getInputs(): Promise<Inputs> {
|
||||
|
@ -41,29 +38,15 @@ export async function getInputs(): Promise<Inputs> {
|
|||
outputs: await getInputList('outputs'),
|
||||
cacheFrom: await getInputList('cache-from'),
|
||||
cacheTo: await getInputList('cache-to'),
|
||||
cacheGithub: /true/i.test(core.getInput('cache-github')),
|
||||
bake: /true/i.test(core.getInput('bake')),
|
||||
bakeFiles: await getInputList('bake-files'),
|
||||
bakeTargets: await getInputList('bake-targets')
|
||||
cacheGithub: /true/i.test(core.getInput('cache-github'))
|
||||
};
|
||||
}
|
||||
|
||||
export async function getArgs(inputs: Inputs): Promise<Array<string>> {
|
||||
let args: Array<string> = ['buildx'];
|
||||
|
||||
if (inputs.bake) {
|
||||
args.push.apply(args, await getBakeArgs(inputs));
|
||||
} else {
|
||||
args.push.apply(args, await getBuildArgs(inputs));
|
||||
}
|
||||
args.push.apply(args, await getBuildArgs(inputs));
|
||||
args.push.apply(args, await getCommonArgs(inputs));
|
||||
|
||||
if (!inputs.bake) {
|
||||
args.push(inputs.context);
|
||||
} else {
|
||||
args.push.apply(args, inputs.bakeTargets);
|
||||
}
|
||||
|
||||
args.push(inputs.context);
|
||||
return args;
|
||||
}
|
||||
|
||||
|
@ -84,14 +67,6 @@ async function getCommonArgs(inputs: Inputs): Promise<Array<string>> {
|
|||
return args;
|
||||
}
|
||||
|
||||
async function getBakeArgs(inputs: Inputs): Promise<Array<string>> {
|
||||
let args: Array<string> = ['bake'];
|
||||
await asyncForEach(inputs.bakeFiles, async bakeFile => {
|
||||
args.push('--file', bakeFile);
|
||||
});
|
||||
return args;
|
||||
}
|
||||
|
||||
async function getBuildArgs(inputs: Inputs): Promise<Array<string>> {
|
||||
let args: Array<string> = ['build'];
|
||||
await asyncForEach(inputs.buildArgs, async buildArg => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue