diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bfb92e31d501..1b19895e2f5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,6 @@ env: SETUP_BUILDX_VERSION: "edge" SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest" SCOUT_VERSION: "1.11.0" - REPO_SLUG: "docker/buildx-bin" DESTDIR: "./bin" TEST_CACHE_SCOPE: "test" TESTFLAGS: "-v --parallel=6 --timeout=30m" @@ -408,67 +407,28 @@ jobs: if-no-files-found: error bin-image: - runs-on: ubuntu-24.04 + uses: crazy-max/.github/.github/workflows/bake-distribute-mp.yml@a94383ec9e125b23907fb6fcebf7ff87964595e5 needs: - test-integration - test-unit - if: ${{ github.event_name != 'pull_request' && github.repository == 'docker/buildx' }} - steps: - - - name: Free disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - android: true - dotnet: true - haskell: true - large-packages: true - swap-storage: true - - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - version: ${{ env.SETUP_BUILDX_VERSION }} - driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }} - buildkitd-flags: --debug - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ env.REPO_SLUG }} - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - bake-target: meta-helper - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - username: ${{ vars.DOCKERPUBLICBOT_USERNAME }} - password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }} - - - name: Build and push image - uses: docker/bake-action@v6 - with: - source: . - files: | - ./docker-bake.hcl - ${{ steps.meta.outputs.bake-file }} - targets: image-cross - push: ${{ github.event_name != 'pull_request' }} - sbom: true - set: | - *.cache-from=type=gha,scope=bin-image - *.cache-to=type=gha,scope=bin-image,mode=max + with: + target: image-cross + push: ${{ github.event_name != 'pull_request' && github.repository == 'docker/buildx' }} + cache: true + cache-scope: bin-image + meta-image: docker/buildx-bin + meta-tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + meta-bake-target: meta-helper + login-username: ${{ vars.DOCKERPUBLICBOT_USERNAME }} + buildx-version: edge + buildx-driver-opts: image=moby/buildkit:latest + buildkitd-flags: --debug + bake-source: . + secrets: + login-password: ${{ secrets.DOCKERPUBLICBOT_WRITE_PAT }} scout: runs-on: ubuntu-24.04 @@ -494,7 +454,7 @@ jobs: with: version: ${{ env.SCOUT_VERSION }} format: sarif - image: registry://${{ env.REPO_SLUG }}:master + image: registry://docker/buildx-bin:master - name: Upload SARIF report uses: github/codeql-action/upload-sarif@v3