2

In my workflow, I am building an image and pushing it to local registry

      - name: build and push to local registry
        uses: docker/build-push-action@v3.3.0
        with:
          context: ${{ inputs.context }}
          file: ${{ inputs.context }}/${{ inputs.dockerfile }}
          no-cache: ${{ inputs.no_cache }}
          build-args: ${{ inputs.build_args }}
          push: true
          tags: ${{ env.LOCAL_IMAGE }}
          outputs: type=image,oci-mediatypes=false

I then use buildx to copy the image to a GCR registry

      - name: copy tagged image to sre gcr
        if: inputs.image_build == true
        shell: bash
        run: |
          docker buildx imagetools create \
            --tag "${{ steps.set-images.outputs.base }}:${{ inputs.image_tag }}" \
            ${{ env.LOCAL_IMAGE }}

Instead of having one image created, I get this:

enter image description here

My workflow uses the local registry service for the initial build of a localhost image that is later copied to various gcr registries through the docker buildx imagetools create command.

    services:
      registry:
        image: registry:2
        ports:
          - 5000:5000

Why is this happening?

pkaramol
  • 16,451
  • 43
  • 149
  • 324

1 Answers1

0

I have this same exact issue, I resulted in using just installing docker on my runner image and building with docker instead until I can allocate some time to build my own custom action container

Branden
  • 198
  • 2
  • 16