Skip to content

Commit

Permalink
FileSync Updates [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 11, 2024
1 parent 25bd3b7 commit 625cda7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions update-digests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
json=$(cat VERSION.json)
upstream_image=$(jq -re '.upstream_image' <<< "${json}")
upstream_tag=$(jq -re '.upstream_tag' <<< "${json}")
if [[ ${upstream_image} == *"hotio/base" ]]; then
upstream_tag="${upstream_tag}-$(curl -fsSL "https://raw.githubusercontent.com${upstream_image//ghcr.io/}/${upstream_tag}/VERSION.json" | jq -re '.version')" || exit 1
fi
manifest=$(skopeo inspect --raw "docker://${upstream_image}:${upstream_tag}") || exit 1
upstream_digest_amd64=$(jq -re '.manifests[] | select (.platform.architecture == "amd64" and .platform.os == "linux").digest' <<< "${manifest}")
upstream_digest_arm64=$(jq -re '.manifests[] | select (.platform.architecture == "arm64" and .platform.os == "linux").digest' <<< "${manifest}")
jq --sort-keys \
--arg upstream_digest_amd64 "${upstream_digest_amd64}" \
--arg upstream_digest_arm64 "${upstream_digest_arm64}" \
'.upstream_digest_amd64 = $upstream_digest_amd64 | .upstream_digest_arm64 = $upstream_digest_arm64' <<< "${json}" | tee VERSION.json

[[ -f update-self-version.sh ]] && bash ./update-self-version.sh

0 comments on commit 625cda7

Please sign in to comment.