Sign updates
The os workflow signs SHA256SUMS with the SIGNING_KEY secret and publishes SHA256SUMS.gpg next to it. systemd-sysupdate now verifies it (Verify=yes) against import-pubring.pgp, so hosts only install updates we built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
7 files changed
+21
-9
No files matched your search
+10
-1
@@ -31,11 +31,20 @@ jobs:
|
||||
zstd -q --rm -T0 -19 git-runner_*.root-*.raw
|
||||
qemu-img convert -c -O qcow2 "$(basename git-runner_*.efi .efi).raw" git-runner.qcow2
|
||||
sha256sum git-runner_*.efi git-runner_*.root-*.raw.zst > SHA256SUMS
|
||||
# Signs SHA256SUMS with the key whose public half is mkosi.extra/usr/lib/systemd/import-pubring.pgp.
|
||||
- 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
|
||||
# Replaces the previous version. SHA256SUMS goes last: until it's there, runners find no update.
|
||||
- name: Publish
|
||||
working-directory: mkosi.output
|
||||
run: |
|
||||
curl -fsS -H "$AUTH" -X DELETE "$PKG" || true
|
||||
for f in $(awk '{print $2}' SHA256SUMS) git-runner.qcow2 SHA256SUMS; do
|
||||
for f in git-runner_*.efi git-runner_*.root-*.raw.zst git-runner.qcow2 SHA256SUMS.gpg SHA256SUMS; do
|
||||
curl -fsS -o /dev/null -H "$AUTH" --upload-file "$f" "$PKG/$f"
|
||||
done
|
||||
Reference in new issue
Block a user