From b628adb6b8fd0ccb3711caf949ebd0e0eb688a35 Mon Sep 17 00:00:00 2001 From: BtbN Date: Thu, 15 Apr 2021 20:13:40 +0200 Subject: [PATCH 1/2] Attempt to fix suboptimal cache behaviour again --- .github/workflows/build.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e678eb1..82b8d1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,6 +75,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Install buildx + uses: docker/setup-buildx-action@v1 - name: Generate Dockerfile run: ./generate.sh ${{ matrix.target }} ${{ matrix.variant }} - name: Login to Docker @@ -86,12 +88,18 @@ jobs: - name: Image Name id: imagename run: | - IMG="ghcr.io/${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}:latest" - echo "::set-output name=name::${IMG/ /-}" + IMG="ghcr.io/${GITHUB_REPOSITORY,,}/${{ matrix.target }}-${{ matrix.variant }}" + echo "::set-output name=name::${IMG/ /-}:latest" + echo "::set-output name=cache_name::${IMG/ /-}:cache" - name: Build variant image - run: docker build --pull --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from ${{ steps.imagename.outputs.name }} --tag ${{ steps.imagename.outputs.name }} . - - name: Push variant image - run: docker push ${{ steps.imagename.outputs.name }} + run: | + docker buildx build \ + --pull \ + --tag ${{ steps.imagename.outputs.name }} \ + --cache-to=type=registry,mode=max,ref=${{ steps.imagename.outputs.cache_name }} \ + --cache-from=type=registry,ref=${{ steps.imagename.outputs.cache_name }} \ + --output=type=image,push=true,name=${{ steps.imagename.outputs.name }} \ + . build_ffmpeg: name: Build ffmpeg needs: build_targets From 0e987c8328b83c9fe257f483d6edab0234e6608b Mon Sep 17 00:00:00 2001 From: BtbN Date: Fri, 16 Apr 2021 18:31:53 +0200 Subject: [PATCH 2/2] Include xxd in base image --- images/base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/base/Dockerfile b/images/base/Dockerfile index 3e9d850..9770d47 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive RUN \ apt-get -y update && \ apt-get -y dist-upgrade && \ - apt-get -y install build-essential yasm nasm pkgconf git curl wget cmake unzip subversion autoconf automake libtool autopoint cmake clang texinfo texi2html gperf gettext itstool ragel libc6-dev libssl-dev gtk-doc-tools gobject-introspection gawk meson ninja-build p7zip-full python3-distutils python3-apt python-is-python3 && \ + apt-get -y install build-essential yasm nasm xxd pkgconf git curl wget cmake unzip subversion autoconf automake libtool autopoint cmake clang texinfo texi2html gperf gettext itstool ragel libc6-dev libssl-dev gtk-doc-tools gobject-introspection gawk meson ninja-build p7zip-full python3-distutils python3-apt python-is-python3 && \ apt-get -y clean RUN git config --global user.email "builder@localhost" && \