Skip to content

Commit

Permalink
Preloading oras://ghcr.io images via CURL
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Oct 28, 2023
1 parent 29711a1 commit 218ab1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hyakvnc
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,12 @@ function ghcr_get_oras_sif {
log ERROR "Failed to get image info for repository ${repo}"
return 1
}
[[ -d "${output_path}" ]] && output_path="${output_path}/sha256:${image_sha256}" # Append the image SHA256 to the output path if it's a directory
[[ -d "${output_path}" ]] && output_path="${output_path}/${image_sha256}" # Append the image SHA256 to the output path if it's a directory

if [[ -r "${output_path}" ]]; then
log DEBUG "Image already exists at ${output_path}"
if check_command sha256sum; then
if sha256sum --quiet --status --ignore-missing --check <(echo "${output_path}" "${image_sha256}"); then
if sha256sum --quiet --status --ignore-missing --check <(echo "${output_path}" "${image_sha256##sha256:}"); then
log DEBUG "Image at ${output_path} matches expected SHA256 ${image_sha256}"
echo "${output_path}"
return 0
Expand Down

0 comments on commit 218ab1e

Please sign in to comment.