From 905f0398f7018e96094a8415c9f23aa1fdbcfd0f Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Sun, 10 Dec 2023 09:37:38 +0100 Subject: [PATCH] (CI)(build-docker) use GHA cache on GH actions --- ci/build-docker-image.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/build-docker-image.sh b/ci/build-docker-image.sh index c9081d3eb..96876a616 100755 --- a/ci/build-docker-image.sh +++ b/ci/build-docker-image.sh @@ -220,6 +220,13 @@ then fi # Construction of Docker buildx arguments begins here +if [[ "${GITHUB_ACTIONS}" == "true" ]] +then + echo -e "\e[35;1mRunning on GitHub Actions, using the specific GHA cache\e[0m" + CI_DOCKER_BUILDX_ARGS+=("--cache-from type=gha") + CI_DOCKER_BUILDX_ARGS+=("--cache-to type=gha,mode=max") +fi + if [[ -n "$CI_DOCKER_PLATFORMS" ]] then CI_DOCKER_BUILDX_ARGS+=("--platform=linux/${CI_DOCKER_PLATFORMS}")