Revert "Fix container registry login: GITEA_TOKEN never grants package access"
CI / frontend-build (pull_request) Has been cancelled
CI / php-tests (pull_request) Has been cancelled
Build / build-and-push (push) Failing after 7s

This reverts commit 8bb9f05559.
This commit was merged in pull request #6.
This commit is contained in:
2026-09-05 13:21:51 +01:00
parent 8bb9f05559
commit d0abd683cc
2 changed files with 16 additions and 16 deletions
+8 -8
View File
@@ -10,17 +10,17 @@ name: Release
# Assumes tags are cut from commits already on main (and so already covered
# by ci.yml's checks) -- this workflow doesn't run the test suite itself.
#
# Requires secrets.CONTAINER_REGISTRY_PASSWORD -- a personal access token
# (write:package scope) from the pushing account, stored manually as a repo
# secret. The auto-injected secrets.GITEA_TOKEN does NOT work for this: it
# never grants package-registry access regardless of the workflow's own
# `permissions:` block -- a known Gitea limitation, not a config mistake
# (https://github.com/go-gitea/gitea/issues/23642).
# Requires secrets.GITEA_TOKEN (auto-injected; needs the "packages"
# permission scope to push images).
on:
push:
tags: ['*']
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
@@ -40,8 +40,8 @@ jobs:
- name: Log in to the container registry
env:
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
run: echo "$CONTAINER_REGISTRY_PASSWORD" | docker login code.aneur.in -u "${{ gitea.actor }}" --password-stdin
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: echo "$GITEA_TOKEN" | docker login code.aneur.in -u "${{ gitea.actor }}" --password-stdin
- name: Build and push the image
run: |