os / os (push) Waiting to run
- Rename the image from agent to agentos (ImageId, hostname, CI, docs). - mkosi.finalize only copies /etc to /usr/share/factory/etc. The hand-written tmpfiles.d/factory-etc.conf links the 24 entries the image needs. - /etc/systemd is writable: PID 1 applies the system presets at first boot and preset-global.service the user presets, as in ParticleOS. - claude-remote runs in the user manager of agent, enabled by a user preset. - Root has no /var subvolume, and the verity partitions shrink to 16M. - Style pass over comments, CLAUDE.md and AGENTS.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
# os.yml builds the OS image and publishes it as version "latest". VMs fetch
|
|
# the built images as updates (mkosi.extra/usr/lib/sysupdate.d). It runs on
|
|
# every push, weekly for package updates, and by hand for critical CVEs.
|
|
#
|
|
# Required values:
|
|
# - SECUREBOOT_KEY repository secret: the private key of mkosi.crt, written
|
|
# to mkosi.key.
|
|
# - SIGNING_KEY repository secret: the armored private gpg key whose
|
|
# public half is mkosi.extra/usr/lib/systemd/
|
|
# import-pubring.pgp, which systemd-sysupdate checks.
|
|
name: os
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "0 2 * * 0"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
os:
|
|
runs-on: linux
|
|
steps:
|
|
- name: Install tools
|
|
run: dnf install -yq mkosi git-core
|
|
- name: Check out
|
|
uses: builtin:checkout
|
|
- name: Build
|
|
env:
|
|
KEY: ${{ secrets.SECUREBOOT_KEY }}
|
|
run: |
|
|
(umask 077 && printf '%s\n' "$KEY" > mkosi.key)
|
|
mkosi build
|
|
- name: Compress
|
|
working-directory: mkosi.output
|
|
run: |
|
|
zstd -q --rm -9 agentos_*.usr-*.raw
|
|
- name: Checksum
|
|
working-directory: mkosi.output
|
|
run: sha256sum agentos_*.efi agentos_*.usr-*.raw.zst > SHA256SUMS
|
|
- name: Sign
|
|
working-directory: mkosi.output
|
|
env:
|
|
KEY: ${{ secrets.SIGNING_KEY }}
|
|
run: |
|
|
export GNUPGHOME=$(mktemp -d)
|
|
gpg -q --batch --import <<< "$KEY"
|
|
gpg -q --batch -o SHA256SUMS.gpg --detach-sign SHA256SUMS
|
|
- name: Build qcow2
|
|
working-directory: mkosi.output
|
|
run: qemu-img convert -c -O qcow2 "$(basename agentos_*.efi .efi).raw" agentos.qcow2
|
|
- name: Publish
|
|
working-directory: mkosi.output
|
|
env:
|
|
PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/agentos/latest
|
|
AUTH: "Authorization: token ${{ gitea.token }}"
|
|
run: |
|
|
curl -fsS -H "$AUTH" -X DELETE "$PKG" || true
|
|
for f in agentos_*.efi agentos_*.usr-*.raw.zst agentos.qcow2 agentos_*.manifest SHA256SUMS.gpg SHA256SUMS; do
|
|
curl -fsS -o /dev/null -H "$AUTH" --upload-file "$f" "$PKG/$f"
|
|
done
|