Skip to content

Commit

Permalink
Don't fail using cache if an image only exists locally (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
agners authored Jun 13, 2022
1 parent 3e71d6f commit b2771f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ function run_build() {
fi

bashio::log.info "Init cache for ${repository}/${image}:${version} with tag ${cache_tag} and platform ${docker_platform}"
docker pull "${repository}/${image}:${cache_tag}" --platform "${docker_platform}" > /dev/null 2>&1 || true

if \
docker pull "${repository}/${image}:${cache_tag}" --platform "${docker_platform}" > /dev/null 2>&1 \
docker image inspect "${repository}/${image}:${cache_tag}" > /dev/null 2>&1 \
&& codenotary_validate "${codenotary_sign}" "${repository}/${image}:${cache_tag}" "false" "${docker_platform}" \
; then
docker_cli+=("--cache-from" "${repository}/${image}:${cache_tag}")
Expand Down

0 comments on commit b2771f8

Please sign in to comment.