From 870c48c070b30aaf180f3ca5febd9baa815941f5 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Sat, 10 Sep 2022 03:00:42 +0200 Subject: [PATCH] Use gha cache --- .github/workflows/image.yml | 9 --------- build/bin/build | 5 ++++- build/docker-bake.hcl | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 550c5b8..529e1d3 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -11,15 +11,6 @@ jobs: - name: checkout code uses: actions/checkout@v3 - - - name: Cache Docker layers - uses: actions/cache@v3 - id: cache - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/build/bin/build b/build/bin/build index da63117..edefd0f 100755 --- a/build/bin/build +++ b/build/bin/build @@ -1,3 +1,6 @@ #!/usr/bin/env bash -docker buildx bake --push --file build/docker-bake.hcl \ No newline at end of file +docker buildx \ + --cache-from "type=gha" \ + --cache-to "type=gha,mode=max" \ + bake --pull --file "build/docker-bake.hcl" \ No newline at end of file diff --git a/build/docker-bake.hcl b/build/docker-bake.hcl index 3fccdf8..db50e92 100644 --- a/build/docker-bake.hcl +++ b/build/docker-bake.hcl @@ -7,7 +7,7 @@ target "build-dockerfile" { } target "build-platforms" { - platforms = ["linux/amd64", "linux/armhf", "linux/aarch64"] + platforms = ["linux/amd64"] } target "build-common" {