fix: check out with git, sign local builds with a test key

gitea-runner 6 has no builtin:checkout, and plain Fedora has no Node.js
for actions/checkout, so the workflow fetches the commit with git.
Setting permissions: keeps read access for that and asks for package
writes.

mkosi genkey won't replace mkosi.crt, so the docs now sign local builds
with a test key in mkosi.local.conf, which also covers the PCR and
verity keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-22 16:07:45 +00:00
1 parent 738a902b2d
commit 94fd5d1ce9
4 files changed
+37 -4

No files matched your search

+20 -2
View File
@@ -35,11 +35,29 @@ itself up as at first boot.
## Development
`mkosi build` signs with `mkosi.key`, the private key of `mkosi.crt`, which
only CI has (the `SECUREBOOT_KEY` secret). `mkosi genkey` won't replace
`mkosi.crt`, so local builds sign with a test key. Make one:
```sh
mkosi genkey # This is for local tests. CI uses the SECUREBOOT_KEY secret.
mkosi build
openssl req -new -x509 -newkey rsa:2048 -nodes -subj /CN=test \
-keyout ~/test.key -out ~/test.crt
```
and point `mkosi.local.conf` at it, which mkosi reads and git ignores:
```ini
[Validation]
SecureBootKey=~/test.key
SecureBootCertificate=~/test.crt
SignExpectedPcrKey=~/test.key
SignExpectedPcrCertificate=~/test.crt
VerityKey=~/test.key
VerityCertificate=~/test.crt
```
Then run `mkosi build`.
`mkosi.output/` then holds the disk image (`agentos_<version>.raw`) and the UKI
and /usr partitions that make up an update.