Skip to content

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Dec 4, 2025

relates to docker/buildx#3520 (review) and internal discussions.

Refactor the inputs for our build workflow to be more consistent with our build-push-action and also avoid confusion like docker/buildx#3520 (review).

The following build-push-action inputs are missing in our reusable workflow but some are not needed:

Name Type Description Note
add-hosts List/CSV List of customs host-to-IP mapping (e.g., docker:10.180.0.1) Not needed
allow List/CSV List of extra privileged entitlement (e.g., network.host,security.insecure) Not needed
attests List List of attestation parameters (e.g., type=sbom,generator=image) Not needed
builder String Builder instance (see setup-buildx action) Not needed
build-contexts List List of additional build contexts (e.g., name=path) Can be added
cache-from List List of external cache sources (e.g., type=local,src=path/to/dir) Not needed
cache-to List List of cache export destinations (e.g., type=local,dest=path/to/dir) Not needed
call String Set method for evaluating build (e.g., check) Not needed
cgroup-parent String Optional parent cgroup for the container used in the build Not needed
load Bool Load is a shorthand for --output=type=docker (default false) Not needed
network String Set the networking mode for the RUN instructions during build Not needed
no-cache Bool Do not use cache when building the image (default false) Not needed
no-cache-filters List/CSV Do not cache specified stages Not needed if we disable cache for now
provenance Bool/String Generate provenance attestation for the build (shorthand for --attest=type=provenance) Not needed, we set it already
secrets List List of secrets to expose to the build (e.g., key=string, GIT_AUTH_TOKEN=mytoken) Can be added
ssh List List of SSH agent socket or keys to expose to the build We could support it but it needs an extra step in our workflow to create the agent.
tags List/CSV List of tags Not needed we are using the metadata-action

@dvdksn I wonder if we could start having examples in this repo for now under a docs dir before having them on docs repo on GA?

@crazy-max crazy-max force-pushed the build-inputs branch 9 times, most recently from 65a88d8 to ee9ed7a Compare December 4, 2025 14:10
@crazy-max crazy-max marked this pull request as ready for review December 4, 2025 15:10
@dvdksn
Copy link

dvdksn commented Dec 4, 2025

Yes @crazy-max would be great to keep examples here until we have something on docs.docker.com

@crazy-max crazy-max force-pushed the build-inputs branch 3 times, most recently from c13ca88 to e9c5806 Compare December 5, 2025 09:39
@crazy-max
Copy link
Member Author

crazy-max commented Dec 5, 2025

@tonistiigi Pushed extra commit to remove GHA cache for now related to #56

@crazy-max crazy-max force-pushed the build-inputs branch 2 times, most recently from bb98b55 to d99e23b Compare December 5, 2025 12:42
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
default: .
output:
default: false
setup-qemu-image:
Copy link
Member

Choose a reason for hiding this comment

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

This should not be configurable in reusable workflow. If needed then we can let users choose the tag/version. This image runs privieleged so could have side-effects. Once the builder is integrated to the binfmt repo, signature of this image needs to be verified(we can create tracking issues).

envs:
type: string
description: "Which scope cache object belongs to if cache enabled (defaults to target name if set)"
description: "Environment variables to inject in the reusable workflow as list of key-value pair. This is similar to the GitHub Actions env context but as it cannot be used when calling a reusable workflow, we need to define our own input"
Copy link
Member

Choose a reason for hiding this comment

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

What is the use-case?

description: "List of build-time variables. If you want to set a build-arg through an environment variable, use the envs input"
required: false
meta-tags:
context:
Copy link
Member

Choose a reason for hiding this comment

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

Do we validate that this can only be subpath for now? Should we call something like subpath.

I think we could be open to supporting external repositories here in the future but it should be create from the validation side that these would require a different kind of policy rules.

required: false
pull:
type: boolean
description: "Always attempt to pull all referenced images"
Copy link
Member

Choose a reason for hiding this comment

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

What's the use-case?

description: "Raw authentication to registries, defined as YAML objects (for image output)"
required: false
github-token:
description: "GitHub Token used to authenticate against a repository for Git context"
Copy link
Member

Choose a reason for hiding this comment

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

So this is for external Git repositories?

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.

4 participants