Use a package-scoped token for Gitea's container registry login
Publish container / publish (push) Successful in 49s

Gitea's own auto-injected GITHUB_TOKEN isn't authorized to write
packages on this instance even with packages:write declared, so the
Gitea-side publish kept failing at login despite targeting the right
registry. Added a REGISTRY_TOKEN repo secret (Gitea PAT scoped to
package: read/write only) and use it when the runner is Gitea; GitHub
keeps using its own real GITHUB_TOKEN for ghcr.io.
This commit is contained in:
mfwadejr
2026-09-21 22:35:37 +00:00
parent 05d24933f1
commit afa8da647f
+1 -1
View File
@@ -34,7 +34,7 @@ jobs:
with:
registry: ${{ steps.registry.outputs.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ github.server_url == 'https://github.com' && secrets.GITHUB_TOKEN || secrets.REGISTRY_TOKEN }}
- name: Generate image tags
id: meta