mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-19 01:46:45 +00:00
Env var to set provenance mode
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
94d76d3bc1
commit
d8b90b1ab1
3 changed files with 63 additions and 9 deletions
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
|
@ -653,6 +653,46 @@ jobs:
|
|||
run: |
|
||||
cat /tmp/buildx-build/provenance.json | jq
|
||||
|
||||
provenance-env-mode:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
mode:
|
||||
- min
|
||||
- max
|
||||
services:
|
||||
registry:
|
||||
image: registry:2
|
||||
ports:
|
||||
- 5000:5000
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
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: image
|
||||
outputs: type=image,name=localhost:5000/name/app:latest,push=true
|
||||
env:
|
||||
BUILDX_PROVENANCE_MODE: ${{ matrix.mode }}
|
||||
-
|
||||
name: Inspect Provenance
|
||||
run: |
|
||||
docker buildx imagetools inspect localhost:5000/name/app:latest --format '{{json .Provenance}}'
|
||||
|
||||
sbom:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue