Use REGISTRY_TOKEN (write:package) for registry login
All checks were successful
Build and Push Docker Images / build-and-push (push) Successful in 17s

The auto GITHUB_TOKEN can't push packages (unauthorized: reqPackageAccess).
Log in with a Forgejo token that has write:package, stored as the
REGISTRY_TOKEN Actions secret.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
dlawler489 2026-06-20 07:22:20 +10:00
parent 374b104236
commit 46ae6ff5fe

View file

@ -31,8 +31,10 @@ jobs:
git fetch --depth 1 origin "${{ github.ref_name }}" git fetch --depth 1 origin "${{ github.ref_name }}"
git checkout -q -f FETCH_HEAD git checkout -q -f FETCH_HEAD
# Uses a Forgejo token with write:package scope (the auto GITHUB_TOKEN
# can't write packages — push fails with 'unauthorized: reqPackageAccess')
- name: Log in to Forgejo container registry - name: Log in to Forgejo container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.plexultra.com -u "${{ github.actor }}" --password-stdin run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.plexultra.com -u "${{ github.actor }}" --password-stdin
- name: Build and push API image - name: Build and push API image
run: | run: |