CI: initial hardcoded ci
Some checks failed
Build container images / Build and push image (base, 43) (push) Failing after 3m51s

This commit is contained in:
2026-02-21 16:00:11 +01:00
parent 08fc14eab5
commit e4f4d78c0e
3 changed files with 101 additions and 7 deletions

View File

@@ -0,0 +1,85 @@
name: Build container images
on:
workflow_dispatch:
pull_request:
branches: ["main"]
push:
branches: ["main"]
jobs:
build_push:
name: Build and push image
runs-on: job-v2
strategy:
fail-fast: false
matrix:
image: [base]
version: [43]
container:
image: "quay.io/fedora-ostree-desktops/buildroot:43"
options: "--security-opt apparmor=unconfined --privileged --user 0:0 --device=/dev/kvm --device=/dev/fuse --volume /:/run/host:rw"
steps:
- name: Install dependencies
run: |
dnf install -y nodejs
dnf upgrade -y --enablerepo=updates-testing --refresh rpm-ostree
- name: Checkout
uses: actions/checkout@v4
- name: Build Bootable Container image
run: |
./builder.sh "${{ matrix.image }}" "${{ matrix.version }}"
- name: Prepare Docker config directory
run: mkdir -p /root/.docker
- name: Login to Container Registry
uses: redhat-actions/podman-login@v1
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
with:
registry: git.plabble.org
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
auth_file_path: /tmp/auth.json
- name: Push container image to container registry
id: push
run: |
# Determine buildid (same logic as upstream)
if [[ -f ".buildid" ]]; then
buildid="$(< .buildid)"
else
buildid="$(date '+%Y%m%d.0')"
echo "${buildid}" > .buildid
fi
version="${{ matrix.version }}"
image="${{ matrix.image }}"
archive="images/${image}/manifest.ociarchive"
echo "Pushing ${archive} as ${image}:${version}.${buildid}"
# Push version.buildid
skopeo copy \
--authfile /tmp/auth.json \
--retry-times 3 \
--dest-compress-format zstd \
--dest-annotation containers.bootc=1 \
--dest-annotation ostree.bootable=true \
oci-archive:${archive} \
docker://git.plabble.org/misthios/${image}:${version}.${buildid}
# Push version
skopeo copy \
--authfile /tmp/auth.json \
--retry-times 3 \
--dest-compress-format zstd \
--dest-annotation containers.bootc=1 \
--dest-annotation ostree.bootable=true \
docker://git.plabble.org/misthios/${image}:${version}.${buildid} \
docker://git.plabble.org/misthios/${image}:${version}

View File

@@ -38,6 +38,3 @@ packages:
repos:
- fedora-base
- fedora-updates
labels:
containers.bootc: "1"

View File

@@ -150,10 +150,7 @@ postprocess:
- |
#!/bin/bash
set -xeuo pipefail
source /usr/lib/os-release
if [ $ID == "fedora" ] && [ ${VERSION_ID} -ge 43 ]; then
echo "enable bootloader-update.service" >> /usr/lib/systemd/system-preset/85-bootc.preset
fi
# Undo RPM scripts enabling units; we want the presets to be canonical
# https://github.com/projectatomic/rpm-ostree/issues/1803
- |
@@ -179,6 +176,21 @@ packages:
- xfsprogs e2fsprogs dosfstools
- bootupd
packages-x86_64:
- grub2 grub2-efi-x64 efibootmgr shim
- microcode_ctl
exclude-packages:
- kernel-debug-core
# The grub bits are mainly designed for desktops, and IMO haven't seen
# enough testing in concert with ostree. At some point we'll flesh out
# the full plan in https://github.com/coreos/fedora-coreos-tracker/issues/47
remove-from-packages:
- [grub2-tools, /etc/grub.d/08_fallback_counting,
/etc/grub.d/10_reset_boot_success,
/etc/grub.d/12_menu_auto_hide,
/usr/lib/systemd/.*]