3636 uses : actions/checkout@v2.3.4
3737 - name : π Run add-on information action
3838 id : information
39- uses : frenck/action-addon-information@v1.2
39+ uses : frenck/action-addon-information@v1.2.2
4040 - name : βΉοΈ Gather version and environment
4141 id : release
4242 run : |
7575 uses : actions/cache@v2.1.6
7676 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
8482 uses : docker/setup-qemu-action@v1.2.0
8583 - 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