Skip to content

Commit

Permalink
Try #650:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Mar 15, 2022
2 parents 2cc449a + 7536f5d commit a1248ce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 17 additions & 6 deletions build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,28 @@ 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
build_args+=(--tag "${tag}")
build_args+=(
--cache-from "type=registry,ref=${tag}"
--tag "${tag}"
)
done

docker buildx build "${build_args[@]}" -f "${dockerfile}" --progress plain .
Expand Down

0 comments on commit a1248ce

Please sign in to comment.