mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-19 01:46:45 +00:00
fix provenance input
When `provenance: false`, we should not set the builder-id. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
2a16835223
commit
0191543e0b
2 changed files with 62 additions and 9 deletions
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
|
@ -523,6 +523,41 @@ jobs:
|
|||
file: ./test/go/Dockerfile
|
||||
outputs: type=cacheonly
|
||||
|
||||
provenance:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
attrs:
|
||||
- ''
|
||||
- mode=max
|
||||
- builder-id=foo
|
||||
- false
|
||||
- true
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
|
||||
driver-opts: |
|
||||
network=host
|
||||
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
|
||||
-
|
||||
name: Build
|
||||
uses: ./
|
||||
with:
|
||||
context: ./test/go
|
||||
file: ./test/go/Dockerfile
|
||||
target: binary
|
||||
outputs: type=oci,dest=/tmp/build.tar
|
||||
provenance: ${{ matrix.attrs }}
|
||||
cache-from: type=gha,scope=provenance
|
||||
cache-to: type=gha,scope=provenance,mode=max
|
||||
|
||||
sbom:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue