diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf3424a..1d65676 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,16 +52,27 @@ jobs: id: build-upload uses: docker/bake-action@v4 with: - push: false + push: true # Using provenance to disable default attestation so it will build only desired images: # https://github.com/orgs/community/discussions/45969 provenance: false set: | *.platform=linux/amd64 *.output=type=registry,push-by-digest=true,name-canonical=true + *.cache-from=type=local,src=/tmp/.buildx-cache + *.cache-to=type=local,mode=max,dest=/tmp/.buildx-cache-new files: | docker-bake.hcl build.json + .github/workflows/env.hcl + + # Temp fix for issue of fast size grow in local caching: + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache - name: Set output variables id: bake_metadata diff --git a/.github/workflows/env.hcl b/.github/workflows/env.hcl new file mode 100644 index 0000000..eea8766 --- /dev/null +++ b/.github/workflows/env.hcl @@ -0,0 +1,2 @@ +# env.hcl +REGISTRY = "ghcr.io/" \ No newline at end of file diff --git a/docker-bake.hcl b/docker-bake.hcl index 0839784..39267d2 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -19,7 +19,7 @@ variable "LAPACK_VERSION" { } target "base" { - tags = ["${ORGANIZATION}/build-machine:newly-baked"] + tags = ["${ORGANIZATION}/build-machine:latest"] context = "." contexts = { base-image = "docker-image://${BASE_IMAGE}"