mirror of
https://github.com/docker/bake-action.git
synced 2026-01-22 20:32:21 +01:00
preserve quotes for set input field
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
@@ -244,3 +244,24 @@ jobs:
|
|||||||
working-directory: ${{ env.DESTDIR }}
|
working-directory: ${{ env.DESTDIR }}
|
||||||
run: |
|
run: |
|
||||||
cat sbom.spdx.json | jq
|
cat sbom.spdx.json | jq
|
||||||
|
|
||||||
|
set:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
registry:
|
||||||
|
image: registry:2
|
||||||
|
ports:
|
||||||
|
- 5000:5000
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
workdir: ./test/go
|
||||||
|
set: |
|
||||||
|
*.platform=linux/amd64
|
||||||
|
*.output=type=image,"name=localhost:5000/name/app:v1.0.0,localhost:5000/name/app:latest",push=true
|
||||||
|
*.tags=
|
||||||
|
|||||||
@@ -265,6 +265,26 @@ describe('getArgs', () => {
|
|||||||
"--provenance", 'builder-id=foo'
|
"--provenance", 'builder-id=foo'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
9,
|
||||||
|
'0.10.0',
|
||||||
|
new Map<string, string>([
|
||||||
|
['load', 'false'],
|
||||||
|
['no-cache', 'false'],
|
||||||
|
['push', 'false'],
|
||||||
|
['pull', 'false'],
|
||||||
|
['set', `*.platform=linux/amd64,linux/ppc64le,linux/s390x\n*.output=type=image,"name=moby/buildkit:v0.11.0,moby/buildkit:latest",push=true`],
|
||||||
|
['targets', `"image-all"`],
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
'bake',
|
||||||
|
'--set', '*.platform=linux/amd64,linux/ppc64le,linux/s390x',
|
||||||
|
'--set', `*.output=type=image,"name=moby/buildkit:v0.11.0,moby/buildkit:latest",push=true`,
|
||||||
|
'--metadata-file', path.join(tmpDir, 'metadata-file'),
|
||||||
|
'--provenance', `mode=min,inline-only=true,builder-id=https://github.com/docker/build-push-action/actions/runs/123456789`,
|
||||||
|
'image-all'
|
||||||
|
]
|
||||||
|
],
|
||||||
])(
|
])(
|
||||||
'[%d] given %p with %p as inputs, returns %p',
|
'[%d] given %p with %p as inputs, returns %p',
|
||||||
async (num: number, buildxVersion: string, inputs: Map<string, string>, expected: Array<string>) => {
|
async (num: number, buildxVersion: string, inputs: Map<string, string>, expected: Array<string>) => {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
provenance: BuildxInputs.getProvenanceInput('provenance'),
|
provenance: BuildxInputs.getProvenanceInput('provenance'),
|
||||||
push: core.getBooleanInput('push'),
|
push: core.getBooleanInput('push'),
|
||||||
sbom: core.getInput('sbom'),
|
sbom: core.getInput('sbom'),
|
||||||
set: Util.getInputList('set', {ignoreComma: true}),
|
set: Util.getInputList('set', {ignoreComma: true, quote: false}),
|
||||||
source: core.getInput('source')
|
source: core.getInput('source')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user