Skip to content

Add --call option as an input #337

Closed

Description

@jeliebig

Description

I have a docker-bake.hcl containing a lot of targets and groups.

My default group contains all targets, so locally I'm able to execute the following to evaluate the build checks:

docker bake --check

Now if I want to do the same with GitHub Actions, according to the documentation, I currently need to add an additional target for every target I already have and a new group containing all the new targets.
Then I could use the targets input to run the build checks for all my targets.

Defining two targets per target just to get build checks working with GitHub Actions seems a bit odd and would make working with my docker-bake.hcl very annoying.

Since the build-push-action already supports the call input, I'm wondering whether the same could be done here.
This way I don't need to modify the docker-bake.hcl and could set the call input to check to run the build checks for all my targets.

Could you consider adding a call input similar to the build-push-action here?

Activity

  1. crazy-max commented on Jul 29, 2025

    @crazy-max
    Member

    Yes we have the --call flag available with bake command: https://docs.docker.com/reference/cli/docker/buildx/bake/#call

    I was wondering if you could use an override in the meantime for call with:

          -
            name: Build and push
            uses: docker/bake-action@v6
            with:
              set: |
                *.call=check

    But this field doesn't seem implemented atm: https://docs.docker.com/reference/cli/docker/buildx/bake/#set

    I put that in our backlog.

  2. self-assigned this
    on Jul 29, 2025
  3. crazy-max commented on Jul 30, 2025

    @crazy-max
    Member

    But this field doesn't seem implemented atm: https://docs.docker.com/reference/cli/docker/buildx/bake/#set

    Oh actually it's implemented but not documented: https://github.com/docker/buildx/blob/1e50e8ddabe108f009b9925e13a321d7c8f99f26/bake/bake.go#L1027-L1028

    So the following should work:

          -
            name: Build and push
            uses: docker/bake-action@v6
            with:
              set: |
                *.call=check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions