Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
feat: add signature rather than replace to allow rebasing back to uBl…
Browse files Browse the repository at this point in the history
…ue main
  • Loading branch information
gerblesh committed Jul 23, 2023
1 parent 23d8b2d commit 211a7b0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,16 @@ fi
# Setup container signing
echo "Setup container signing in policy.json and cosign.yaml"
echo "Registry to write: $IMAGE_REGISTRY"
sed -i "s ghcr.io/ublue-os $IMAGE_REGISTRY g" /usr/etc/containers/policy.json
sed -i "s ublue-os.pub cosign.pub g" /usr/etc/containers/policy.json

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

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

# Run "post" scripts.
Expand Down

0 comments on commit 211a7b0

Please sign in to comment.