Skip to content

Commit 1ae1ec8

Browse files
authored
ci: don't fail testing docker image build without a cached image (#2286)
1 parent 2991a8e commit 1ae1ec8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.ci/docker/util.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ for version in $versions; do
4343

4444
case $ACTION in
4545
build)
46+
cache_image="${full_image_name}"
47+
# check that we have an image before using it as a cache
48+
docker manifest inspect "${full_image_name}" || cache_image=
49+
4650
DOCKER_BUILDKIT=1 docker build \
4751
--progress=plain \
48-
--cache-from="${full_image_name}" \
52+
--cache-from="${cache_image}" \
4953
-f "${project_root}/tests/Dockerfile" \
5054
--build-arg PYTHON_IMAGE="${version/-/:}" \
5155
-t "${full_image_name}" \

0 commit comments

Comments
 (0)