From 4b865064d42bc5999c004457d440994d554da9c5 Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Sat, 23 May 2026 21:49:43 +0000 Subject: [PATCH] ci: migrate from ghcr.io to Gitea registry - Update REGISTRY env var from ghcr.io to git.farh.net - Remove credentials blocks from postgres/redis service containers - Update login step condition from main-only to all push events - Use GITEA_TOKEN instead of GITHUB_TOKEN for registry auth - Update deploy-dev and deploy-uat kustomize image references - Rename login step to Gitea Container Registry Fixes CAR-995 Co-Authored-By: Paperclip --- .gitea/workflows/ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 57e5255..7a824ff 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -15,7 +15,7 @@ permissions: packages: write env: - REGISTRY: ghcr.io + REGISTRY: git.farh.net IMAGE_NAME: cartsnitch/api jobs: @@ -53,9 +53,6 @@ jobs: services: postgres: image: postgres:15-alpine - credentials: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} env: POSTGRES_USER: cartsnitch POSTGRES_PASSWORD: cartsnitch_test @@ -69,9 +66,6 @@ jobs: --health-retries 5 redis: image: redis:7-alpine - credentials: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} ports: - 6379:6379 options: >- @@ -129,13 +123,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Log in to GHCR - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + - name: Log in to Gitea Container Registry + if: github.event_name == 'push' uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITEA_TOKEN }} - name: Extract metadata id: meta @@ -225,7 +219,7 @@ jobs: if: needs.build-and-push.result == 'success' run: | cd infra/apps/overlays/dev - kustomize edit set image ghcr.io/cartsnitch/api:${{ steps.api_tag.outputs.tag }} + kustomize edit set image git.farh.net/cartsnitch/api:${{ steps.api_tag.outputs.tag }} - name: Commit and push to infra run: | @@ -269,7 +263,7 @@ jobs: if: needs.build-and-push.result == 'success' run: | cd infra/apps/overlays/uat - kustomize edit set image ghcr.io/cartsnitch/api:${{ steps.api_tag.outputs.tag }} + kustomize edit set image git.farh.net/cartsnitch/api:${{ steps.api_tag.outputs.tag }} - name: Commit and push to infra run: |