Skip to content

use Docker GitHub Builder to build and sign binaries and bin image#13568

Merged
ndeloof merged 2 commits intodocker:mainfrom
crazy-max:github-builder
Feb 3, 2026
Merged

use Docker GitHub Builder to build and sign binaries and bin image#13568
ndeloof merged 2 commits intodocker:mainfrom
crazy-max:github-builder

Conversation

@crazy-max
Copy link
Member

What I did

Similar to what we did in Buildx repo:

Switch to our Docker GitHub Builder to build and sign binaries and bin image.

For binaries, the sigstore bundle will be upload as asset to the GitHub Release. For the bin image the signature is an OCI artifact.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Comment on lines +112 to +128
bin-image-test:
if: github.event_name == 'pull_request'
uses: docker/github-builder/.github/workflows/bake.yml@v1
with:
runner: amd64
target: image-cross
cache: true
cache-scope: bin-image-test
output: image
push: false
sbom: true
set-meta-labels: true
meta-images: |
compose-bin
meta-tags: |
type=ref,event=pr
meta-bake-target: meta-helper
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This job is just for testing bin image job works properly on pull request event as the merge workflow doesn't have any pull request trigger atm.

Comment on lines +85 to +104
bin-image:
uses: docker/github-builder/.github/workflows/bake.yml@v1
permissions:
contents: read # same as global permission
id-token: write # for signing attestation(s) with GitHub OIDC Token
with:
runner: amd64
target: image-cross
cache: true
cache-scope: bin-image
output: image
push: ${{ github.event_name != 'pull_request' }}
sbom: true
set-meta-labels: true
meta-images: |
${{ needs.bin-image-prepare.outputs.repo-slug }}
meta-tags: |
type=ref,event=tag
type=edge
meta-bake-target: meta-helper
Copy link
Member Author

@crazy-max crazy-max Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With our reusable workflow, the build is distributed across runners using a matrix based on target platforms to be built, reducing the build time quite a lot.

Before ~14m:

image

Now ~3m:

image

@crazy-max
Copy link
Member Author

Looking at new ci run, would need to update branch protection rule to remove the following jobs from required check:

image

@crazy-max crazy-max marked this pull request as ready for review February 3, 2026 10:31
@crazy-max crazy-max requested a review from a team as a code owner February 3, 2026 10:31
@crazy-max crazy-max requested review from glours and ndeloof February 3, 2026 10:31
@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

target: release
output: local
sbom: true
sign: ${{ github.event_name != 'pull_request' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! I was looking for a way to get this into docker/compose and eventually kill compose-private, seems we are getting closer

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for now we should keep compose-private for notarizing darwin and windows binaries.

Copy link
Contributor

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪄

@ndeloof ndeloof enabled auto-merge (rebase) February 3, 2026 10:35
@ndeloof ndeloof merged commit 9dc7f1e into docker:main Feb 3, 2026
40 checks passed
@crazy-max crazy-max deleted the github-builder branch February 3, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants