Skip to content

Commit 4dfe3d3

Browse files
committed
ci: distribute multi-platform bin-image build
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 5dc1a33 commit 4dfe3d3

File tree

1 file changed

+16
-56
lines changed

1 file changed

+16
-56
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ env:
3131
SETUP_BUILDX_VERSION: "edge"
3232
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
3333
SCOUT_VERSION: "1.11.0"
34-
REPO_SLUG: "docker/buildx-bin"
3534
DESTDIR: "./bin"
3635
TEST_CACHE_SCOPE: "test"
3736
TESTFLAGS: "-v --parallel=6 --timeout=30m"
@@ -405,63 +404,24 @@ jobs:
405404
if-no-files-found: error
406405

407406
bin-image:
408-
runs-on: ubuntu-24.04
407+
uses: crazy-max/.github/.github/workflows/bake-distribute-mp.yml@0acc187b016a2946786f201397bbcfb2c530ffc7
409408
needs:
410409
- test-integration
411410
- test-unit
412-
if: ${{ github.event_name != 'pull_request' && github.repository == 'docker/buildx' }}
413-
steps:
414-
-
415-
name: Free disk space
416-
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
417-
with:
418-
android: true
419-
dotnet: true
420-
haskell: true
421-
large-packages: true
422-
swap-storage: true
423-
-
424-
name: Set up QEMU
425-
uses: docker/setup-qemu-action@v3
426-
-
427-
name: Set up Docker Buildx
428-
uses: docker/setup-buildx-action@v3
429-
with:
430-
version: ${{ env.SETUP_BUILDX_VERSION }}
431-
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
432-
buildkitd-flags: --debug
433-
-
434-
name: Docker meta
435-
id: meta
436-
uses: docker/metadata-action@v5
437-
with:
438-
images: |
439-
${{ env.REPO_SLUG }}
440-
tags: |
441-
type=ref,event=branch
442-
type=ref,event=pr
443-
type=semver,pattern={{version}}
444-
bake-target: meta-helper
445-
-
446-
name: Login to DockerHub
447-
if: github.event_name != 'pull_request'
448-
uses: docker/login-action@v3
449-
with:
450-
username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
451-
password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}
452-
-
453-
name: Build and push image
454-
uses: docker/bake-action@v6
455-
with:
456-
files: |
457-
./docker-bake.hcl
458-
cwd://${{ steps.meta.outputs.bake-file }}
459-
targets: image-cross
460-
push: ${{ github.event_name != 'pull_request' }}
461-
sbom: true
462-
set: |
463-
*.cache-from=type=gha,scope=bin-image
464-
*.cache-to=type=gha,scope=bin-image,mode=max
411+
with:
412+
target: image-cross
413+
push: ${{ github.event_name != 'pull_request' && github.repository == 'docker/buildx' }}
414+
cache: true
415+
cache-scope: bin-image
416+
meta-image: docker/buildx-bin
417+
meta-tags: |
418+
type=ref,event=branch
419+
type=ref,event=pr
420+
type=semver,pattern={{version}}
421+
meta-bake-target: meta-helper
422+
login-username: ${{ vars.DOCKERPUBLICBOT_USERNAME }}
423+
secrets:
424+
login-password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }}
465425

466426
scout:
467427
runs-on: ubuntu-24.04
@@ -487,7 +447,7 @@ jobs:
487447
with:
488448
version: ${{ env.SCOUT_VERSION }}
489449
format: sarif
490-
image: registry://${{ env.REPO_SLUG }}:master
450+
image: registry://docker/buildx-bin:master
491451
-
492452
name: Upload SARIF report
493453
uses: github/codeql-action/upload-sarif@v3

0 commit comments

Comments
 (0)