diff --git a/CHANGELOG.md b/CHANGELOG.md index d2d7416bd..88ad18124 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,15 +5,16 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- #650 - Improve Docker caching. - #588 - fix ci: bump openssl version in freebsd again - #552 - Added CHANGELOG.md automation - #543 - Added environment variables to control the UID and GID in the container - #534 - fix image builds with update of dependencies - #502 - fix ci: bump openssl version in freebsd -- #501 - x86_64-linux: lower glibc version requirement to 2.17 (compatible with centos 7) -- #500 - use runner setting specified in Cross.toml +- #501 - x86_64-linux: lower glibc version requirement to 2.17 (compatible with centos 7) +- #500 - use runner setting specified in Cross.toml - #498 - bump linux-image version to fix CI -- #497 - don't set RUSTFLAGS in aarch64-musl image +- #497 - don't set RUSTFLAGS in aarch64-musl image - #492 - Add cmake to FreeBSD images - #489 - Add support for more hosts and simplify/unify host support checks - #477 - Fix Docker/Podman links in README diff --git a/build-docker-image.sh b/build-docker-image.sh index 13b4f1a5f..508d9a559 100755 --- a/build-docker-image.sh +++ b/build-docker-image.sh @@ -66,13 +66,21 @@ run() { ;; esac - build_args+=(--pull) + build_args+=( + --pull + --cache-from "type=registry,ref=${image_name}:main" + ) + + if "${push}"; then + build_args+=(--cache-to 'type=inline') + fi if [[ -n "${GITHUB_ACTIONS-}" ]]; then - build_args+=( - --cache-from "type=gha,url=${ACTIONS_CACHE_URL},token=${ACTIONS_RUNTIME_TOKEN}" - --cache-to "type=gha,mode=max,url=${ACTIONS_CACHE_URL},token=${ACTIONS_RUNTIME_TOKEN}" - ) + build_args+=(--cache-from "type=gha,url=${ACTIONS_CACHE_URL},token=${ACTIONS_RUNTIME_TOKEN}") + + if ! "${push}"; then + build_args+=(--cache-to "type=gha,mode=max,url=${ACTIONS_CACHE_URL},token=${ACTIONS_RUNTIME_TOKEN}") + fi fi for tag in "${tags[@]}"; do diff --git a/docker/linux-image.sh b/docker/linux-image.sh index 01b595015..b878745c1 100755 --- a/docker/linux-image.sh +++ b/docker/linux-image.sh @@ -58,7 +58,7 @@ main() { # there is no stable port arch=ppc64 # https://packages.debian.org/en/sid/linux-image-powerpc64 - kversion='5.16.0-4' + kversion='5.*' kernel="${kversion}-powerpc64" libgcc="libgcc-s1" debsource="deb http://ftp.ports.debian.org/debian-ports unstable main"