Skip to content

Commit

Permalink
test: check preserved quotes for set input
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Apr 17, 2023
1 parent 794e8fa commit e454d5b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,19 @@ jobs:
working-directory: ${{ env.DESTDIR }}
run: |
cat sbom.spdx.json | jq
set:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Build
uses: ./
with:
workdir: ./test/go
set: |
*.platform=linux/amd64
*.output=type=image,name="registry.local/foo:v1.0.0,registry.local/foo:latest",push=false
*.tags=
20 changes: 20 additions & 0 deletions __tests__/context.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,26 @@ describe('getArgs', () => {
"--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',
async (num: number, buildxVersion: string, inputs: Map<string, string>, expected: Array<string>) => {
Expand Down

0 comments on commit e454d5b

Please sign in to comment.