fix: use GITEA_TOKEN for GHCR login in Gitea Actions (CAR-892) #7
Reference in New Issue
Block a user
Delete Branch "betty/car-892-gitea-actions-ghcr-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix: Gitea Actions GHCR authentication failure
Issue: CAR-892
Root cause
In Gitea Actions,
${{ secrets.GITHUB_TOKEN }}is not available. Thedocker/login-actionstep was failing withauthentication requiredwhen pushing toghcr.io/cartsnitch/auth, which caused thebuild-and-pushjob to fail on every branch (main, dev, uat).This left the auth service with a stale image on UAT, resulting in HTTP 503 from
cartsnitch.uat.farh.net/auth/get-session.Fix
Replace
${{ secrets.GITHUB_TOKEN }}with${{ secrets.GITEA_TOKEN }}in thedocker/login-actionconfiguration.The
GITEA_TOKENsecret was already configured for infra checkout; it also haspackages:writescope needed for GHCR pushes.Verification
devbranch after mergehttps://cartsnitch.uat.farh.net/auth/get-sessionreturns 200cc @cpfarhood
Replace ${{ secrets.GITHUB_TOKEN }} with ${{ secrets.GITEA_TOKEN }} for docker/login-action in Gitea Actions. GITHUB_TOKEN is not available in Gitea Actions and was causing 'authentication required' failures for ghcr.io push, leaving the auth service with a stale image on UAT. Co-Authored-By: Paperclip <noreply@paperclip.ing>