Use Docker bake to build targets

This commit is contained in:
2025-11-16 20:21:58 +01:00
parent d4842f1cda
commit 6ac36cfddc

View File

@@ -63,7 +63,6 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.OCI_REPO }}
tags: |
type=edge
type=ref,event=branch
@@ -71,21 +70,19 @@ jobs:
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
- name: Build container
- name: Bake containers
id: build
uses: docker/build-push-action@v6
uses: docker/bake-action@v6
with:
context: .
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file }}
push: true
sbom: true
provenance: mode=max
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
"RELEASE_VERSION=${{ env.RELEASE_VERSION }}"
env:
TAG_BASE: ${{ env.OCI_REPO }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}
- name: Generate CRDs