Skip to content

Commit

Permalink
Use registry cache
Browse files Browse the repository at this point in the history
  • Loading branch information
lmakarov committed May 17, 2024
1 parent 0ab124d commit a37a333
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,19 @@ jobs:
tags: ${{ env.BUILD_IMAGE_TAG }}-${{ env.GIT_SHA7 }}-${{ env.ARCH }}
push: ${{ github.event_name != 'pull_request' }} # Don't push for PRs
# Disable automatic image attestations
# With image attestations enabled, docker buildx with push the image to the registry as a manifest list.
# With image attestations enabled, the image tag pushed to the registry is a manifest list.
# That makes it impossible to stitch different platform images together in a manifest list, since you
# cannot have a manifest list of manifest lists.
# See https://docs.docker.com/build/attestations/attestation-storage/
# TODO: Refactor to allow for image attestations
provenance: false
sbom: false
# BUILD_IMAGE_TAG - persistent multi-arch tag, updated at the end of the build (success or failure)
cache-from: type=registry,ref=${{ env.BUILD_IMAGE_TAG }}
cache-to: type=inline # Write the cache metadata into the image configuration
#cache-from: type=registry,ref=${{ env.BUILD_IMAGE_TAG }}
#cache-to: type=inline # Write the cache metadata into the image configuration
# Use registry cache with max mode to store all image layers in the registry cache
cache-from: type=registry,ref=${{ env.BUILD_IMAGE_TAG }}-${{ env.ARCH }}-buildcache
cache-to: type=registry,ref=${{ env.BUILD_IMAGE_TAG }}-${{ env.ARCH }}-buildcache,mode=max

test:
name: "Test: ${{ matrix.version }}/${{ matrix.arch }}"
Expand Down

0 comments on commit a37a333

Please sign in to comment.