Skip to content

Comments

ci: use docker github builder to build binaries and images#6388

Merged
crazy-max merged 5 commits intomoby:masterfrom
crazy-max:github-builder
Jan 13, 2026
Merged

ci: use docker github builder to build binaries and images#6388
crazy-max merged 5 commits intomoby:masterfrom
crazy-max:github-builder

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max force-pushed the github-builder branch 3 times, most recently from 7aa4db6 to 162db6c Compare November 28, 2025 16:42
@crazy-max crazy-max requested a review from tonistiigi December 1, 2025 09:29
@crazy-max crazy-max marked this pull request as ready for review December 1, 2025 09:29
@crazy-max crazy-max force-pushed the github-builder branch 5 times, most recently from de8b0a1 to 89e97d4 Compare December 18, 2025 16:02
@crazy-max crazy-max mentioned this pull request Jan 8, 2026
27 tasks
@crazy-max crazy-max added this to the v0.27.0 milestone Jan 8, 2026
@crazy-max crazy-max marked this pull request as draft January 8, 2026 16:49
@crazy-max crazy-max marked this pull request as ready for review January 9, 2026 16:44
contents: read # same as global permission
id-token: write # for signing attestation(s) with GitHub OIDC Token
with:
runner: amd64
Copy link
Member

Choose a reason for hiding this comment

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

Is there a need for this or is amd64 just faster?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really a need but as we are doing cross compilation we can just use official GitHub-hosted runner and avoid relying on partner images: https://github.com/actions/partner-runner-images?tab=readme-ov-file#github-actions-partner-runner-images

name: ${{ needs.binaries.outputs.artifact-name }}
-
name: Rename provenance and sbom
run: |
Copy link
Member

Choose a reason for hiding this comment

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

Not needed atm but eventually we should provide some examples for github builder users for verifying the signatures of these artifacts. Eg. if for any reason the signature is not valid, that should error before creating the release.

Copy link
Member Author

@crazy-max crazy-max Jan 11, 2026

Choose a reason for hiding this comment

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

Not needed atm but eventually we should provide some examples for github builder users for verifying the signatures of these artifacts.

They have an example in the usage section using the verify reusable workflow: https://github.com/docker/github-builder-experimental?tab=readme-ov-file#build-reusable-workflow

They also have the cosign verify commands as output so they can invoke them locally if they want to: https://github.com/docker/github-builder-experimental/blob/7643588149117bf0ca3a906caa3968c70484027a/.github/workflows/build.yml#L133-L135

Looks like this: https://github.com/docker/github-builder-experimental/actions/runs/20895583887/job/60033611659#step:2:24

We could also print cosign commands in the build summary, this is tracked in docker/github-builder#11

Eg. if for any reason the signature is not valid, that should error before creating the release.

We are also verifying the signature after signing blobs during build: https://github.com/docker/github-builder-experimental/blob/7643588149117bf0ca3a906caa3968c70484027a/.github/workflows/build.yml#L627-L630

Looks like this: https://github.com/docker/github-builder-experimental/actions/runs/20895583887/job/60033587793#step:12:62

image

Copy link
Member

Choose a reason for hiding this comment

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

We are also verifying the signature after signing blobs during build:

Yes but this is in our controlled repository. If the app is pushing a release from their own CI workflow, then ideally, they first verify the artifacts themselves instead of just trusting that the remote builder did it. There is also a case that something malicious gained capability to write artifacts (or overwrite the artifacts created by docker builder) so this way we can check that these were indeed the artifacts from the trusted builder.

INPUT_IMAGE-NAME: ${{ env.IMAGE_NAME }}
with:
script: |
const defaultBase = core.getInput('default-base');
Copy link
Member

Choose a reason for hiding this comment

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

These kinds of big inline blocks could have a comment in the beginning explaining the intention of the script.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max merged commit 1885684 into moby:master Jan 13, 2026
222 of 223 checks passed
@crazy-max crazy-max deleted the github-builder branch January 13, 2026 08:50
set: |
*.args.IMAGE_TARGET=${{ matrix.target }}
*.args.EXPORT_BASE=${{ matrix.base }}
*.args.BUILDKITD_TAGS=${{ matrix.buildTags }}
Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants