Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates 3 Google Container Registry images instead of the one #767

Closed
murphman300 opened this issue Jan 20, 2023 · 4 comments
Closed

Creates 3 Google Container Registry images instead of the one #767

murphman300 opened this issue Jan 20, 2023 · 4 comments

Comments

@murphman300
Copy link

murphman300 commented Jan 20, 2023

Troubleshooting

Before submitting a bug report please read the Troubleshooting doc.

Behaviour

On pretty out of the box setup, the action creates 3 GCR images, and applies a Created timestamp dating back to 1969.

Steps to reproduce this issue

The result on GCR was this:
image

Now the result is this:

image

Expected behaviour

The action deploys 1 image and tags that one as latest

image

Actual behaviour

The action deploys 3 images, instead of 1, the first one being uploaded being the right one

image

Configuration

This file has had no commits this week and was working up until 24h ago

      - name: Build docker image
        uses: docker/build-push-action@v3
        with:
          context: .
          file: ./apps/<project-name>/Dockerfile
          push: true
          tags: |
            gcr.io/${{ secrets.GCP_PROJECT_ID }}/<project-name>-ssr:${{ github.sha }}
            gcr.io/${{ secrets.GCP_PROJECT_ID }}/<project-name>-ssr:latest
          build-args: |
            some args here..
          cache-from: type=local,src=/tmp/.buildx-cache
          cache-to: type=local,dest=/tmp/.buildx-cache-new

Logs

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

Logs don't indicate anything job side - however, when i pull one of those images of 0 or ~1.4KB in size i get this error from docker:

unsupported media type application/vnd.in-toto+json

@tonistiigi
Copy link
Member

docker/buildx#1533

@murphman300
Copy link
Author

murphman300 commented Jan 20, 2023

docker/buildx#1533

I'll try this out as, indeed, we didn't set that flag. Thanks @tonistiigi !

Kind of an interesting lapse of timing and communication from Cloud run if you ask me however.. lol

@murphman300
Copy link
Author

Fixed indeed

@petr-nazarov-yoobic
Copy link

This issue also can cause the following error in gcp cloud run Image [name] not found. This is how I ended up here. As @tonistiigi mentioned, setting provenance: false fixes it. Note, this is only supported in docker/build-push-action@v3 not v2.

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

No branches or pull requests

3 participants