Skip to content

Commit

Permalink
fix policy.json hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
gerblesh committed Jul 23, 2023
1 parent 2533499 commit e9b2ec4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e9b2ec4

Please sign in to comment.