Skip to content

Commit

Permalink
feat: create /usr/share/ublue-os/image-info.json inside signing.sh (#157
Browse files Browse the repository at this point in the history
)

* feat: create /usr/share/ublue-os/image-info.json inside signing.sh

* chore: remove debug call to cat, fix formatting
  • Loading branch information
gerblesh authored Sep 22, 2023
1 parent aee351f commit 5838d0f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config/scripts/signing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/registries.d/"$IMAGE_NAME".yaml

0 comments on commit 5838d0f

Please sign in to comment.