From 4a296883dc536b1dcda1aa651b50b4ffad5218ac Mon Sep 17 00:00:00 2001 From: Job Date: Mon, 23 Nov 2026 18:48:23 +0000 Subject: [PATCH] fix: publish with PACKAGE_TOKEN, new update signing key These missed PR #2, which was merged before them. Gitea gives the job token at most read access to a user's packages, so Publish uses the PACKAGE_TOKEN secret, a token with only write:package. The permissions block never helped and goes. The update signing key is new ("agentos updates"). The old one was a copy of runneros's ("git-runner updates") and its private half is lost. The SIGNING_KEY secret already holds the new key. VMs installed with the old key need a reinstall to take updates. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/os.yml | 7 +++---- mkosi.extra/usr/lib/systemd/import-pubring.pgp | Bin 222 -> 219 bytes 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/os.yml b/.gitea/workflows/os.yml index 662dc60..40fffa1 100644 --- a/.gitea/workflows/os.yml +++ b/.gitea/workflows/os.yml @@ -8,6 +8,8 @@ # - 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. +# - PACKAGE_TOKEN repository secret: a token of the package owner with only +# write:package. The job token can't write packages. name: os on: push: @@ -19,9 +21,6 @@ on: jobs: os: runs-on: linux - permissions: - contents: read - packages: write steps: - name: Install tools run: dnf install -yq mkosi @@ -55,7 +54,7 @@ jobs: working-directory: mkosi.output env: PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/agentos/latest - AUTH: "Authorization: token ${{ gitea.token }}" + AUTH: "Authorization: token ${{ secrets.PACKAGE_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 diff --git a/mkosi.extra/usr/lib/systemd/import-pubring.pgp b/mkosi.extra/usr/lib/systemd/import-pubring.pgp index ab0c59e573166f8f9a02c947ee8ddc237f9360d7..1bc6ce5cdb946f153de6de93cf5895e50aebf232 100644 GIT binary patch delta 179 zcmcb|c$?8~hA~SvOQ)z9r#2fS3*#+!env)ihcnll)Fcd)*5)_nv_FuE4Q*T>+Pe61 zNSRV%W5IJviz8e36Vp@kO7e>*ItoioGP;p)`lM0))hDI$vK5Lx94A_5urh%RotUTO z2NS8#W%w&{LVvBUuVLDHzE3=J{(fJ5?dOHEzYJRroUxX>Xpo;;%<#X|E>CGkO^w^O c)rV3ZnM-|@_s