Fix GitHub Actions Docker build cache configuration

- Re-add Docker Buildx setup (required for cache)
- Use 'type=inline' for cache-to (embeds cache in image)
- Cache from the latest image instead of separate buildcache tag

This fixes the 'Cache export is not supported' error.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Graham McIntire 2025-07-26 16:27:06 -05:00
parent 1cfeaf556e
commit 160c4fdc0e
No known key found for this signature in database

View file

@ -43,6 +43,9 @@ jobs:
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
@ -50,8 +53,8 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
cache-to: type=inline
deploy:
needs: build-and-push