Skip to content

Commit 316d5eb

Browse files
committed
build-args newline split
Signed-off-by: ruslandoga <67764432+ruslandoga@users.noreply.github.com>
1 parent 1d910c8 commit 316d5eb

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

__tests__/context.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,24 @@ nproc=3`],
517517
'--metadata-file', '/tmp/.docker-build-push-jest/metadata-file',
518518
'https://github.com/docker/build-push-action.git#refs/heads/test-jest:subdir'
519519
]
520+
],
521+
[
522+
17,
523+
'0.8.2',
524+
new Map<string, string>([
525+
['build-args', 'BUILD_INFO={"tags":["ghcr.io/ghost/docker-build-info:master","ghcr.io/ghost/docker-build-info:59d6c0f","ghcr.io/ghost/docker-build-info:master-59d6c0f"]}'],
526+
['load', 'false'],
527+
['no-cache', 'false'],
528+
['push', 'false'],
529+
['pull', 'false'],
530+
]),
531+
[
532+
'build',
533+
'--build-arg', 'BUILD_INFO={"tags":["ghcr.io/ghost/docker-build-info:master","ghcr.io/ghost/docker-build-info:59d6c0f","ghcr.io/ghost/docker-build-info:master-59d6c0f"]}',
534+
'--iidfile', '/tmp/.docker-build-push-jest/iidfile',
535+
'--metadata-file', '/tmp/.docker-build-push-jest/metadata-file',
536+
'https://github.com/docker/build-push-action.git#refs/heads/test-jest'
537+
]
520538
]
521539
])(
522540
'[%d] given %p with %p as inputs, returns %p',

src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function getInputs(defaultContext: string): Promise<Inputs> {
7373
addHosts: await getInputList('add-hosts'),
7474
allow: await getInputList('allow'),
7575
attests: await getInputList('attests', true),
76-
buildArgs: await getInputList('build-args', true),
76+
buildArgs: core.getMultilineInput('build-args'),
7777
buildContexts: await getInputList('build-contexts', true),
7878
builder: core.getInput('builder'),
7979
cacheFrom: await getInputList('cache-from', true),

0 commit comments

Comments
 (0)