os.yml: Publish with the PACKAGE_TOKEN secret
os / os (push) Successful in 3m59s

Gitea gives the job token at most read access to a user's packages, so
publishing needs a token of the owner. The permissions block didn't help
and goes; the default lets actions/checkout read the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-23 18:41:17 +00:00
1 parent 1c906b9b68
commit 094ee671d7
1 file changed
+3 -4
+3 -4
View File
@@ -8,6 +8,8 @@
# - SIGNING_KEY repository secret: the armored private gpg key whose # - SIGNING_KEY repository secret: the armored private gpg key whose
# public half is mkosi.extra/usr/lib/systemd/ # public half is mkosi.extra/usr/lib/systemd/
# import-pubring.pgp, which systemd-sysupdate checks. # 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 name: os
on: on:
push: push:
@@ -19,9 +21,6 @@ on:
jobs: jobs:
os: os:
runs-on: linux runs-on: linux
permissions:
contents: read
packages: write
steps: steps:
- name: Install tools - name: Install tools
run: dnf install -yq mkosi run: dnf install -yq mkosi
@@ -55,7 +54,7 @@ jobs:
working-directory: mkosi.output working-directory: mkosi.output
env: env:
PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/runneros/latest PKG: ${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/runneros/latest
AUTH: "Authorization: token ${{ gitea.token }}" AUTH: "Authorization: token ${{ secrets.PACKAGE_TOKEN }}"
run: | run: |
curl -fsS -H "$AUTH" -X DELETE "$PKG" || true curl -fsS -H "$AUTH" -X DELETE "$PKG" || true
for f in runneros_*.efi runneros_*.usr-*.raw.zst runneros.qcow2 runneros_*.manifest SHA256SUMS.gpg SHA256SUMS; do for f in runneros_*.efi runneros_*.usr-*.raw.zst runneros.qcow2 runneros_*.manifest SHA256SUMS.gpg SHA256SUMS; do