no-cache-filters input

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-07-18 17:24:11 +02:00
parent a8d76c070a
commit 5ffbca1432
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
7 changed files with 73 additions and 42 deletions

View file

@ -28,6 +28,7 @@ export interface Inputs {
load: boolean;
network: string;
noCache: boolean;
noCacheFilters: string[];
outputs: string[];
platforms: string[];
pull: boolean;
@ -83,6 +84,7 @@ export async function getInputs(defaultContext: string): Promise<Inputs> {
load: core.getBooleanInput('load'),
network: core.getInput('network'),
noCache: core.getBooleanInput('no-cache'),
noCacheFilters: await getInputList('no-cache-filters'),
outputs: await getInputList('outputs', true),
platforms: await getInputList('platforms'),
pull: core.getBooleanInput('pull'),
@ -141,6 +143,9 @@ async function getBuildArgs(inputs: Inputs, defaultContext: string, buildxVersio
await asyncForEach(inputs.labels, async label => {
args.push('--label', label);
});
await asyncForEach(inputs.noCacheFilters, async noCacheFilter => {
args.push('--no-cache-filter', noCacheFilter);
});
await asyncForEach(inputs.outputs, async output => {
args.push('--output', output);
});