0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

docker/build-push-actionでcache-toにGoogle Container Registryを指定すると400 Bad Requestになるとき

Last updated at Posted at 2022-06-19

こういうGithub Actionがあるとする

name: Deploy
on: push
jobs:
  test:
    name: test
    runs-on: Ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - uses: google-github-actions/auth@v0
        with:
          project_id: your-own-project
          credentials_json: ${{ secrets.GCP_SA_KEY }}
      - run: gcloud auth configure-docker
      - uses: docker/setup-buildx-action@v2
      - uses: docker/build-push-action@v3
        with:
          tags: your-own-project
          cache-from: type=registry,ref=asia.gcr.io/your-own-project/your-own-project-cache
          cache-to: type=registry,ref=asia.gcr.io/your-own-project/your-own-project-cache,mode=max

このActionを実行するとこういうエラーが出る

buildx failed with: error: failed to solve: error writing manifest blob: failed commit on ref "sha256:b436d0ae59aa712572ed25eabccb2fbda5c32b6f74ba03358732229cbefa0647": unexpected status: 400 Bad Request

解決策

Container RegistryではなくArtifact Registryを使え

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?