fix: use PAT for Gitea Container Registry authentication
Gitea's GITHUB_TOKEN is read-only for packages (issue #23642). Switch to PACKAGES_TOKEN Personal Access Token with write:package scope. Setup required: 1. Gitea → User Settings → Applications → Generate Token (read:package, write:package) 2. Repo → Settings → Actions → Secrets → PACKAGES_TOKEN
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
|
# Required repo secret: PACKAGES_TOKEN
|
||||||
|
# Generate at: Gitea → User Settings → Applications → Generate New Token
|
||||||
|
# Scopes: read:package, write:package
|
||||||
|
# Save as: Repository → Settings → Actions → Secrets → PACKAGES_TOKEN
|
||||||
|
# Note: GITHUB_TOKEN is read-only for packages in Gitea (issue #23642).
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["**"]
|
branches: ["**"]
|
||||||
@@ -113,8 +119,8 @@ jobs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.mrixs.me
|
registry: gitea.mrixs.me
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
|
|||||||
Reference in New Issue
Block a user