🚀 Add-on CI improvements (#190)

This commit is contained in:
Franck Nijhof 2021-08-17 22:00:33 +02:00 committed by GitHub
parent 451ce9d5cf
commit d767ac9940
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 12 deletions

View file

@ -75,11 +75,9 @@ jobs:
uses: actions/cache@v2.1.6
with:
path: /tmp/.docker-cache
key:
docker-${{ github.ref }}-${{ matrix.architecture }}-${{ github.sha
}}
key: docker-${{ matrix.architecture }}-${{ github.sha }}
restore-keys: |
docker-${{ github.ref }}-${{ matrix.architecture }}
docker-${{ matrix.architecture }}
- name: 🏗 Set up QEMU
uses: docker/setup-qemu-action@v1.2.0
- name: 🏗 Set up Docker Buildx
@ -140,7 +138,7 @@ jobs:
cache-from: |
type=local,src=/tmp/.docker-cache
ghcr.io/hassio-addons/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:edge
cache-to: type=local,mode=max,dest=/tmp/.docker-cache
cache-to: type=local,mode=max,dest=/tmp/.docker-cache-new
platforms: ${{ steps.flags.outputs.platform }}
build-args: |
BUILD_ARCH=${{ matrix.architecture }}
@ -151,6 +149,14 @@ jobs:
BUILD_REF=${{ github.sha }}
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=${{ needs.information.outputs.version }}
# This ugly bit is necessary, or our cache will grow forever...
# Well until we hit GitHub's limit of 5GB :)
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: 🚚 Swap build cache
run: |
rm -rf /tmp/.docker-cache
mv /tmp/.docker-cache-new /tmp/.docker-cache
- name: 🔏 Notarize
# yamllint disable rule:line-length
run: |