diff --git a/scripts/build.sh b/scripts/build.sh index 3f2561552c..ef653bd129 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -109,13 +109,16 @@ fi echo "Setup container signing in policy.json and cosign.yaml" echo "Registry to write: $IMAGE_REGISTRY" -jq '.transports.docker."$IMAGE_REGISTRY" += [{ +POLICY=$(jq '.transports.docker."$IMAGE_REGISTRY" += [{ "type": "sigstoreSigned", "keyPath": "/usr/etc/pki/containers/cosign.pub", "signedIdentity": { "type": "matchRepository" } -}]' /usr/etc/containers/policy.json > /usr/etc/containers/policy.json +}]' /usr/etc/containers/policy.json) + +echo "policy.json: $POLICY" +echo $POLICY > /usr/etc/containers/policy.json cp /usr/etc/containers/registries.d/ublue-os.yaml /usr/etc/containers/registries.d/cosign.yaml sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/registries.d/cosign.yaml