From 9659e63208de21fd121fe98c2477511e2d4ceae6 Mon Sep 17 00:00:00 2001 From: Barcode Betty Date: Sat, 23 May 2026 22:14:55 +0000 Subject: [PATCH] ci: migrate from ghcr.io to Gitea built-in registry - Update REGISTRY env var: ghcr.io -> git.farh.net - Replace Docker Hub + GHCR login with Gitea login step - Remove credentials blocks from postgres and redis service definitions - Update deploy-dev/deploy-uat kustomize image refs to use $REGISTRY var Fixes QA FAIL from PR #23: missing Gitea login step. Co-Authored-By: Paperclip --- .gitea/workflows/ci.yml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 7a908d2..12dcd77 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: @@ -51,9 +51,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 @@ -67,9 +64,6 @@ jobs: --health-retries 5 redis: image: redis:7-alpine - credentials: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} ports: - 6379:6379 options: >- @@ -122,19 +116,8 @@ jobs: echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "CalVer tag: $VERSION" - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Log in to GHCR - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to Gitea Container Registry + run: echo "${{ github.token }}" | docker login git.farh.net -u ${{ github.actor }} --password-stdin - name: Extract metadata id: meta @@ -171,7 +154,7 @@ jobs: only-fixed: "true" output-format: sarif - + - name: Push Docker image if: github.event_name == 'push' @@ -224,7 +207,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 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.api_tag.outputs.tag }} - name: Commit and push to infra run: | @@ -268,7 +251,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 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.api_tag.outputs.tag }} - name: Commit and push to infra run: |