Skip to content

Commit

Permalink
feat: create /usr/share/ublue-os/image-info.json inside signing.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Sep 22, 2023
1 parent 0b0b60b commit b940712
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 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,10 @@ 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
cat /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 b940712

Please sign in to comment.