From e9b2ec4f247cc67bb3769ef37fba25af778b5eac Mon Sep 17 00:00:00 2001 From: gerblesh <101901964+gerblesh@users.noreply.github.com> Date: Sun, 23 Jul 2023 00:08:13 -0700 Subject: [PATCH] fix policy.json hopefully --- scripts/build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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