From 6c2079483ed8cd675d71b5a395b81fa9a19eddc8 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:25:57 +0100 Subject: [PATCH] disable quotes detection for "outputs" input Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- __tests__/context.test.ts | 20 ++++++++++++++++++++ src/context.ts | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/__tests__/context.test.ts b/__tests__/context.test.ts index a0c55fa50..bcc8bba45 100644 --- a/__tests__/context.test.ts +++ b/__tests__/context.test.ts @@ -705,6 +705,26 @@ ANOTHER_SECRET=ANOTHER_SECRET_ENV`] '--metadata-file', path.join(tmpDir, 'metadata-file'), '.' ] + ], + [ + 29, + '0.12.0', + new Map([ + ['context', '.'], + ['outputs', `type=image,"name=localhost:5000/name/app:latest,localhost:5000/name/app:foo",push-by-digest=true,name-canonical=true,push=true`], + ['load', 'false'], + ['no-cache', 'false'], + ['push', 'false'], + ['pull', 'false'], + ]), + [ + 'build', + '--iidfile', path.join(tmpDir, 'iidfile'), + "--output", `type=image,"name=localhost:5000/name/app:latest,localhost:5000/name/app:foo",push-by-digest=true,name-canonical=true,push=true`, + "--provenance", `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`, + '--metadata-file', path.join(tmpDir, 'metadata-file'), + '.' + ] ] ])( '[%d] given %p with %p as inputs, returns %p', diff --git a/src/context.ts b/src/context.ts index 358ba29b8..28ec8710f 100644 --- a/src/context.ts +++ b/src/context.ts @@ -60,7 +60,7 @@ export async function getInputs(): Promise { network: core.getInput('network'), noCache: core.getBooleanInput('no-cache'), noCacheFilters: Util.getInputList('no-cache-filters'), - outputs: Util.getInputList('outputs', {ignoreComma: true}), + outputs: Util.getInputList('outputs', {ignoreComma: true, quote: false}), platforms: Util.getInputList('platforms'), provenance: BuildxInputs.getProvenanceInput('provenance'), pull: core.getBooleanInput('pull'),