Skip to content

Docker push creates multiple images on GCR, some with creation timestamp equal to 0 epoch #771

@pantelis-karamolegkos

Description

@pantelis-karamolegkos

Troubleshooting

Before submitting a bug report please read the Troubleshooting doc.

Behaviour

Steps to reproduce this issue

Build an image and push 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 }}
          cache-to: type=inline
          provenance: false

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 }}

Expected behaviour

Tell us what should happen

One image should be created

Actual behaviour

Instead, I am seeing this weird behaviour

Tell us what happens instead

Screenshot 2023-01-23 at 9 05 51 PM

Configuration

My workflow uses the local registry service

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

FWIW

  • Repository URL (if public):
  • Build URL (if public):
# paste your YAML workflow file here and remove sensitive data

Logs

Download the log file of your build and attach it to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions