Skip to content

Ability to use multiple names when using output type=image #1072

Closed
@alessfg

Description

@alessfg

Description

Hello! Not entirely sure if this is a bug or a missing functionality, but tl;dr -- I can't seem to figure out how to use multiple names when using output type=image and thus push the image to multiple registries (you can find the original PR here nginx/docker-nginx-unprivileged#195). The docs mention that when using the buildx CLI, you can wrap the list of names in double quotes, but no matter what I try, this action seems to fail. I've tested all combinations of escape sequences too to no avail ("",\",\\"). I've also opened up a discussion which includes a bit more information (#1067). Finally, here's a sample code block of one of the things I've tried:

- name: Build and push image to Docker Hub and GitHub Container Registry
  id: build
  uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
  with:
    platforms: ${{ matrix.platform }}
    context: "."
    labels: ${{ steps.meta.outputs.labels }}
    outputs: type=image,name=\"ghcr.io/nginxinc/nginx-unprivileged,docker.io/nginxinc/nginx-unprivileged\",push-by-digest=true,name-canonical=true,push=true

Let me know if you need any more information!

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions