Skip to content

Commit

Permalink
(CI)(build-docker) use GHA cache on GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Dec 10, 2023
1 parent 93bea69 commit 905f039
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ci/build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit 905f039

Please sign in to comment.