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

Cache does not work with ghcr.io tries to push to docker.io #25

Open
absmith82 opened this issue Sep 28, 2021 · 1 comment
Open

Cache does not work with ghcr.io tries to push to docker.io #25

absmith82 opened this issue Sep 28, 2021 · 1 comment
Assignees

Comments

@absmith82
Copy link

When I try and use cache with ghcr.io it sends a warning and doesn't cache the build

WARN[0212] error uploading layer to cache: failed to push to destination cache-image:: HEAD https://index.docker.io/v2/library/cache-image/blobs/: unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)

env:
  # Use docker.io for Docker Hub if empty
  REGISTRY: ghcr.io
  # github.repository as <account>/<repo>
  IMAGE_NAME: ${{ github.repository }}
jobs:
  build:
    name: Build with Kaniko
    runs-on: self-hosted
    steps:
      - id: image_name
        name: image_name
        uses: ASzc/change-string-case-action@v1
        with:
          string: ${{ github.repository }}
      - uses: actions/checkout@master
      - name: Kaniko build
        uses: aevea/action-kaniko@master
        with:
          registry: ${{ env.REGISTRY }}
          image: ${{ steps.image_name.outputs.lowercase }}
          password: ${{ secrets.GITHUB_TOKEN }}
          cache: true
          cache_registry: cache-image
          tag: develop
          build_file: docker/Dockerfile
@fallion
Copy link
Member

fallion commented Oct 23, 2021

@aexvir don't know if you saw this one.

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