mirror of
https://github.com/get-aurora-dev/iso.git
synced 2026-11-03 21:49:46 -09:00
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>
This commit is contained in:
parent
ed802cca8f
commit
12b8d1df47
5 changed files with 35 additions and 0 deletions
23
.github/setup-runner-keys.sh
vendored
Executable file
23
.github/setup-runner-keys.sh
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/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
|
||||
2
.github/workflows/build-iso-stable.yml
vendored
2
.github/workflows/build-iso-stable.yml
vendored
|
|
@ -8,6 +8,8 @@ on:
|
|||
paths:
|
||||
- ".github/workflows/build-iso-stable.yml"
|
||||
- ".github/workflows/reusable-build-iso-anaconda.yml"
|
||||
- ".github/setup-runner-keys.sh"
|
||||
- "ghcr.io-ublue-os.pub"
|
||||
- "iso_files/**"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
|
|
|
|||
2
.github/workflows/build-iso-testing.yml
vendored
2
.github/workflows/build-iso-testing.yml
vendored
|
|
@ -8,6 +8,8 @@ on:
|
|||
paths:
|
||||
- ".github/workflows/build-iso-testing.yml"
|
||||
- ".github/workflows/reusable-build-iso-anaconda.yml"
|
||||
- ".github/setup-runner-keys.sh"
|
||||
- "ghcr.io-ublue-os.pub"
|
||||
- "iso_files/**"
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ jobs:
|
|||
- name: Maximize build space
|
||||
uses: ublue-os/remove-unwanted-software@695eb75bc387dbcd9685a8e72d23439d8686cba6 # v10
|
||||
|
||||
- name: Configure containers policy for build
|
||||
run: |
|
||||
sudo ./.github/setup-runner-keys.sh
|
||||
|
||||
- name: Checkout common repo
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
with:
|
||||
|
|
|
|||
4
ghcr.io-ublue-os.pub
Normal file
4
ghcr.io-ublue-os.pub
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
-----BEGIN PUBLIC KEY-----
|
||||
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHLRpBfPRYiMl9wb7s6fx47PzzNWu
|
||||
3zyJgXhWEvxoOgwv9CpwjbvUwR9qHxNMWkJhuGE6cjDA2hpy1I6NbA+24Q==
|
||||
-----END PUBLIC KEY-----
|
||||
Loading…
Reference in a new issue