From 1d4dd4484d9f92d7a4dfaad494a5d47c6d5bf4f5 Mon Sep 17 00:00:00 2001 From: syeopite <70992037+syeopite@users.noreply.github.com> Date: Sat, 21 Aug 2021 13:32:28 +0000 Subject: [PATCH] Add cache(?) to arm docker build (#2337) * Add cache(?) to arm docker build * Update ci.yml --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa6f9e33..4fa27ab0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,14 +106,29 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Cache Docker layers + uses: actions/cache@v2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-multi-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-multi-buildx + - name: Build Docker ARM64 image uses: docker/build-push-action@v2 with: context: . file: docker/Dockerfile.arm64 platforms: linux/arm64/v8 + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new - name: Test Docker run: while curl -Isf http://localhost:3000; do sleep 1; done + - name: Override old Docker cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache +