Skip to content

Commit

Permalink
feat: build both stable and testing CoreOS streams (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
bsherman authored Jul 11, 2024
1 parent 6787c65 commit d0e7b95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
- fsync
- fsync-lts
- surface
- coreos
- coreos-stable
- coreos-testing
cfile_suffix:
- common
- extra
Expand Down Expand Up @@ -164,8 +165,9 @@ jobs:
$dnf config-manager --add-repo=https://pkg.surfacelinux.com/fedora/linux-surface.repo
linux=$($dnf repoquery --repoid linux-surface --whatprovides kernel-surface | tail -n1 | sed 's/.*://')
;;
"coreos")
coreos_kernel_release=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:stable | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
"coreos-stable"|"coreos-testing")
coreos_stream=$(echo "${{ matrix.kernel_flavor }}" | cut -f2 -d-)
coreos_kernel_release=$(skopeo inspect docker://quay.io/fedora/fedora-coreos:${coreos_stream} | jq -r '.Labels["ostree.linux"] | split(".x86_64")[0]')
coreos_fedora_version=$(echo $coreos_kernel_release | grep -oP 'fc\K[0-9]+')
if [[ "${{ matrix.fedora_version }}" == "$coreos_fedora_version" ]]; then
linux="${coreos_kernel_release}"
Expand Down
4 changes: 2 additions & 2 deletions build-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ elif [[ "surface" == "${KERNEL_FLAVOR}" ]]; then
--install kernel-surface-modules \
--install kernel-surface-modules-core \
--install kernel-surface-modules-extra
elif [[ "coreos" == "${KERNEL_FLAVOR}" ]] && \
elif [[ "${KERNEL_FLAVOR}" =~ "coreos" ]] && \
[[ -n "${KERNEL_VERSION}" ]]; then
echo "Installing CoreOS Kernel"
KERNEL_MAJOR_MINOR_PATCH=$(echo $KERNEL_VERSION | cut -d '-' -f 1)
Expand Down Expand Up @@ -156,7 +156,7 @@ fi
install -Dm644 /tmp/certs/public_key.der /etc/pki/akmods/certs/public_key.der
install -Dm644 /tmp/certs/private_key.priv /etc/pki/akmods/private/private_key.priv

if [[ "coreos" == "${KERNEL_FLAVOR}" ]]; then
if [[ "${KERNEL_FLAVOR}" =~ "coreos" ]]; then
install -Dm644 /tmp/certs/public_key.der /lib/modules/${KERNEL_VERSION}.x86_64/build/certs/signing_key.x509
install -Dm644 /tmp/certs/private_key.priv /lib/modules/${KERNEL_VERSION}.x86_64/build/certs/signing_key.pem
fi
Expand Down

0 comments on commit d0e7b95

Please sign in to comment.