mirror-get-aurora-dev-iso/.github/setup-runner-keys.sh
inffy 12b8d1df47
feat(ci): setups containers policy (#89)
* chore: add ublue-os. pub key

* add runner-keys script

* modify the workflows

* rename the ublue-os key

* fix

* Apply batched suggestions from code review

Co-authored-by: renner <80410025+renner0e@users.noreply.github.com>

---------

Co-authored-by: renner <80410025+renner0e@users.noreply.github.com>
2026-09-12 19:07:41 +00:00

23 lines
737 B
Bash
Executable file

#!/usr/bin/env bash
# Setup Public Keys for containers that are pulled during the build
set -eoux pipefail
PKI_DIR="/etc/pki/containers"
REGISTRIES="/etc/containers/registries.d"
mkdir -p "${PKI_DIR}" "${REGISTRIES}"
cp ghcr.io-ublue-os.pub "${PKI_DIR}/ghcr.io-ublue-os.pub"
yq -n '.docker."ghcr.io/ublue-os".use-sigstore-attachments = true' | tee "${REGISTRIES}"/ublue-os.yaml
jq '.transports.docker["ghcr.io/ublue-os"] = [
{
"type": "sigstoreSigned",
"keyPath": "/etc/pki/containers/ghcr.io-ublue-os.pub",
"signedIdentity": {
"type": "matchRepository"
}
}
]' /etc/containers/policy.json | tee /etc/containers/policy.json.tmp > /dev/null && mv /etc/containers/policy.json.tmp /etc/containers/policy.json