From 5838d0fce460e2cb667a9b6c7aa966cc0e9d06b7 Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Fri, 22 Sep 2023 02:22:38 -0700 Subject: [PATCH] feat: create /usr/share/ublue-os/image-info.json inside signing.sh (#157) * feat: create /usr/share/ublue-os/image-info.json inside signing.sh * chore: remove debug call to cat, fix formatting --- config/scripts/signing.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/scripts/signing.sh b/config/scripts/signing.sh index fc42de9c90..8affdd907b 100644 --- a/config/scripts/signing.sh +++ b/config/scripts/signing.sh @@ -10,7 +10,7 @@ cp /usr/share/ublue-os/cosign.pub /usr/etc/pki/containers/"$IMAGE_NAME".pub FILE=/usr/etc/containers/policy.json -yq -i -o=j '.transports.docker |= +yq -i -o=j '.transports.docker |= {"'"$IMAGE_REGISTRY"'": [ { "type": "sigstoreSigned", @@ -23,5 +23,8 @@ yq -i -o=j '.transports.docker |= } + .' "$FILE" +IMAGE_REF="ostree-image-signed:docker://$IMAGE_REGISTRY/$IMAGE_NAME" +printf '{\n"image-ref": "'"$IMAGE_REF"'",\n"image-default-tag": "latest"\n}' > /usr/share/ublue-os/image-info.json + cp /usr/etc/containers/registries.d/ublue-os.yaml /usr/etc/containers/registries.d/"$IMAGE_NAME".yaml -sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/registries.d/"$IMAGE_NAME".yaml \ No newline at end of file +sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/registries.d/"$IMAGE_NAME".yaml