Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/setup-runner-keys.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions .github/workflows/build-iso-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-iso-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reusable-build-iso-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions ghcr.io-ublue-os.pub
Comment thread
inffy marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEHLRpBfPRYiMl9wb7s6fx47PzzNWu
3zyJgXhWEvxoOgwv9CpwjbvUwR9qHxNMWkJhuGE6cjDA2hpy1I6NbA+24Q==
-----END PUBLIC KEY-----