Skip to content

Commit

Permalink
fix: image signing script
Browse files Browse the repository at this point in the history
An overlay might support multiple SBC's from a single image. No point in
trying to sign an already signed image. So select images to sign unique
by image name.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Mar 18, 2024
1 parent 61e6760 commit 2aad9ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/scripts/sign-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

EXTERNAL_OVERLAY_IMAGES=$(crane export "${OVERLAYS_IMAGE_REF}" | tar x --to-stdout overlays.yaml | yq '.overlays[] | .image + "@" + .digest')
EXTERNAL_OVERLAY_IMAGES=$(crane export "${OVERLAYS_IMAGE_REF}" | tar x --to-stdout overlays.yaml | yq '.overlays | unique_by(.image) | .[] | .image + "@" + .digest')
OVERLAY_IMAGE_DIGEST=$(crane digest "${OVERLAYS_IMAGE_REF}")

for IMAGE in ${EXTERNAL_OVERLAY_IMAGES} ${OVERLAYS_IMAGE_REF}@${OVERLAY_IMAGE_DIGEST}; do
Expand Down

0 comments on commit 2aad9ab

Please sign in to comment.