From 011f7cc87d25e1bacfcc0a88ecdbb89445ce21b4 Mon Sep 17 00:00:00 2001 From: Phil Date: Sat, 31 Oct 2026 12:13:43 -0600 Subject: [PATCH] ci: Log in to the registry with a write:package token The automatic Actions token is refused by the container registry (run 107: unauthorized). Use the REGISTRY_TOKEN repository secret. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/build-container.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build-container.yml b/.gitea/workflows/build-container.yml index a07f091..e923100 100644 --- a/.gitea/workflows/build-container.yml +++ b/.gitea/workflows/build-container.yml @@ -23,8 +23,11 @@ jobs: run: apk add --no-cache nodejs git docker-cli docker-cli-buildx - name: Checkout uses: actions/checkout@v4 + # The automatic Actions token can't log in to the container registry, so + # this uses a personal access token with only the write:package scope, + # stored as the repository secret REGISTRY_TOKEN. - name: Log in to the Gitea registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.actor }}" --password-stdin + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "$REGISTRY" -u "${{ github.repository_owner }}" --password-stdin - name: Use the BuildKit socket run: docker buildx create --name ci --driver remote "$BUILDKIT" --use - name: Build and push