action-kaniko
action-kaniko copied to clipboard
Cache does not work with ghcr.io tries to push to docker.io
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
@aexvir don't know if you saw this one.