75757676 with :
7777 path : /tmp/.docker-cache
78- key :
79- docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha
80- }}
78+ key : docker-${{ matrix.architecture }}-${{ github.sha }}
8179 restore-keys : |
82- docker-${{ github.ref }}-${{ matrix.architecture }}
80+ docker-${{ matrix.architecture }}
8381 - name : π Set up QEMU
84828583 - name : π Set up Docker Buildx
@@ -140,7 +138,7 @@ jobs:
140138 cache-from : |
141139 type=local,src=/tmp/.docker-cache
142140 ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:edge
143- cache-to : type=local,mode=max,dest=/tmp/.docker-cache
141+ cache-to : type=local,mode=max,dest=/tmp/.docker-cache-new
144142 platforms : ${{ steps.flags.outputs.platform }}
145143 build-args : |
146144 BUILD_ARCH=${{ matrix.architecture }}
@@ -151,6 +149,14 @@ jobs:
151149 BUILD_REF=${{ github.sha }}
152150 BUILD_REPOSITORY=${{ github.repository }}
153151 BUILD_VERSION=${{ needs.information.outputs.version }}
152+ # This ugly bit is necessary, or our cache will grow forever...
153+ # Well until we hit GitHub's limit of 5GB :)
154+ # https://github.com/docker/build-push-action/issues/252
155+ # https://github.com/moby/buildkit/issues/1896
156+ - name : π Swap build cache
157+ run : |
158+ rm -rf /tmp/.docker-cache
159+ mv /tmp/.docker-cache-new /tmp/.docker-cache
154160 - name : π Notarize
155161 # yamllint disable rule:line-length
156162 run : |
0 commit comments