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

400 Bad Request #1111

Open
3 tasks done
ikaaasra opened this issue May 6, 2024 · 4 comments
Open
3 tasks done

400 Bad Request #1111

ikaaasra opened this issue May 6, 2024 · 4 comments

Comments

@ikaaasra
Copy link

ikaaasra commented May 6, 2024

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

docker/setup-buildx-action#20 exporting to image
docker/setup-buildx-action#20 exporting manifest sha256:35e18d8d4307852968643876c6b989f9b84fddacba4ca295188f25c7a26ffca5 done
docker/setup-buildx-action#20 exporting config sha256:794f12649df6de63a6738f3869bdabb14fd52fe2764e5d2aff3588628e6a0e33 done
docker/setup-buildx-action#20 exporting attestation manifest sha256:c6dca146f2990a48b1f8aae54b5748eeae0b6813f5edab5cf9b5ae8f8e81d1d1 done
docker/setup-buildx-action#20 exporting manifest list sha256:37b4dd0d4c6c614b1206ce37e51e26d26d99b20a49e15329797d74ffc766508c done
docker/setup-buildx-action#20 pushing layers 0.1s done
docker/setup-buildx-action#20 ERROR: failed to push ghcr.io/tenant:0.0.0: unexpected status from HEAD request to https://ghcr.io/v2/tenant/blobs/sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: 400 Bad Request
------
 > exporting to image:
------
ERROR: failed to solve: failed to push ghcr.io/tenant:0.0.0: unexpected status from HEAD request to https://ghcr.io/v2/tenant/blobs/sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: 400 Bad Request
Error: buildx failed with: ERROR: failed to solve: failed to push ghcr.io/tenant:0.0.0: unexpected status from HEAD request to https://ghcr.io/v2/tenant/blobs/sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: 400 Bad Request

YAML workflow

- name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          registry: ${{ vars.DOCKERHUB_REGISTRY }}
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_PASSWORD }}
@ikaaasra
Copy link
Author

ikaaasra commented May 6, 2024

hello ... why before it is work but now it is not work

@crazy-max
Copy link
Member

docker/setup-buildx-action#20 exporting to image
docker/setup-buildx-action#20 exporting manifest sha256:35e18d8d4307852968643876c6b989f9b84fddacba4ca295188f25c7a26ffca5 done
docker/setup-buildx-action#20 exporting config sha256:794f12649df6de63a6738f3869bdabb14fd52fe2764e5d2aff3588628e6a0e33 done
docker/setup-buildx-action#20 exporting attestation manifest sha256:c6dca146f2990a48b1f8aae54b5748eeae0b6813f5edab5cf9b5ae8f8e81d1d1 done
docker/setup-buildx-action#20 exporting manifest list sha256:37b4dd0d4c6c614b1206ce37e51e26d26d99b20a49e15329797d74ffc766508c done
docker/setup-buildx-action#20 pushing layers 0.1s done
docker/setup-buildx-action#20 ERROR: failed to push ghcr.io/tenant:0.0.0: unexpected status from HEAD request to https://ghcr.io/v2/tenant/blobs/sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: 400 Bad Request
------
 > exporting to image:
------
ERROR: failed to solve: failed to push ghcr.io/tenant:0.0.0: unexpected status from HEAD request to https://ghcr.io/v2/tenant/blobs/sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: 400 Bad Request
Error: buildx failed with: ERROR: failed to solve: failed to push ghcr.io/tenant:0.0.0: unexpected status from HEAD request to https://ghcr.io/v2/tenant/blobs/sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8: 400 Bad Request

Looks like you open an issue on the wrong repo. Seems build related (either build-push-action or bake-action). Can you post the full workflow so I can move the issue to the right place?

@ikaaasra
Copy link
Author

ikaaasra commented May 6, 2024

@crazy-max


  deploy:
    needs:
      - build
    if: github.event_name != 'pull_request'
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./packages/${{github.workflow}}
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          registry: ${{ vars.DOCKERHUB_REGISTRY }}
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_PASSWORD }}

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ vars.DOCKERHUB_REGISTRY }}/${{github.workflow}}
          tags: |
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}

      - name: Build and Push
        uses: docker/build-push-action@v5
        with:
          context: "{{defaultContext}}:packages/${{github.workflow}}"
          file: ./dockerfile
          push: ${{ github.event_name != 'pull_request' }}
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}

@crazy-max crazy-max transferred this issue from docker/setup-buildx-action May 6, 2024
@crazy-max
Copy link
Member

Looking at the logs it tries to push ghcr.io/tenant:0.0.0 which doesn't sounds right as it's missing the repo name. Hence why you got a 400. Do you have a link to your repository if public or can you show full logs of the job?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants