From ed62648a9d682cba313740f54b2c8701d6cbb7bb Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Wed, 20 May 2026 10:56:10 +0000 Subject: [PATCH] fix(ci): use Gitea registry auth + E2E DinD networking - Change Docker login to git.farh.net with secrets.REGISTRY_TOKEN (not ghcr.io/GITHUB_TOKEN) - Update all image tags from ghcr.io/groombook to git.farh.net/groombook - Replace GitHub Actions cache (type=gha) with registry cache (type=registry) - Add PLAYWRIGHT_BASE_URL env var for E2E DinD networking (http://host.docker.internal:8080) - Update deploy-dev kubectl Job to use git.farh.net image - GRO-1344 Co-Authored-By: Paperclip --- .github/workflows/ci.yml | 62 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 926389f..2928136 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,9 +157,9 @@ jobs: - name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + registry: git.farh.net + username: ${{ gitea.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} - name: Build and push API image uses: docker/build-push-action@v6 @@ -169,10 +169,10 @@ jobs: target: runner push: true tags: | - ghcr.io/groombook/api:${{ steps.version.outputs.tag }} - ${{ github.ref == 'refs/heads/main' && 'ghcr.io/groombook/api:latest' || '' }} - cache-from: type=gha - cache-to: type=gha,mode=max + git.farh.net/groombook/api:${{ steps.version.outputs.tag }} + ${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/api:latest' || '' }} + cache-from: type=registry,ref=git.farh.net/groombook/cache:api + cache-to: type=registry,ref=git.farh.net/groombook/cache:api,mode=max - name: Build and push Migrate image uses: docker/build-push-action@v6 @@ -182,10 +182,10 @@ jobs: target: migrate push: true tags: | - ghcr.io/groombook/migrate:${{ steps.version.outputs.tag }} - ${{ github.ref == 'refs/heads/main' && 'ghcr.io/groombook/migrate:latest' || '' }} - cache-from: type=gha - cache-to: type=gha,mode=max + git.farh.net/groombook/migrate:${{ steps.version.outputs.tag }} + ${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/migrate:latest' || '' }} + cache-from: type=registry,ref=git.farh.net/groombook/cache:migrate + cache-to: type=registry,ref=git.farh.net/groombook/cache:migrate,mode=max - name: Build and push Seed image uses: docker/build-push-action@v6 @@ -195,10 +195,10 @@ jobs: target: seed push: true tags: | - ghcr.io/groombook/seed:${{ steps.version.outputs.tag }} - ${{ github.ref == 'refs/heads/main' && 'ghcr.io/groombook/seed:latest' || '' }} - cache-from: type=gha - cache-to: type=gha,mode=max + git.farh.net/groombook/seed:${{ steps.version.outputs.tag }} + ${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/seed:latest' || '' }} + cache-from: type=registry,ref=git.farh.net/groombook/cache:seed + cache-to: type=registry,ref=git.farh.net/groombook/cache:seed,mode=max - name: Build and push Reset image uses: docker/build-push-action@v6 @@ -208,10 +208,10 @@ jobs: target: reset push: true tags: | - ghcr.io/groombook/reset:${{ steps.version.outputs.tag }} - ${{ github.ref == 'refs/heads/main' && 'ghcr.io/groombook/reset:latest' || '' }} - cache-from: type=gha - cache-to: type=gha,mode=max + git.farh.net/groombook/reset:${{ steps.version.outputs.tag }} + ${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/reset:latest' || '' }} + cache-from: type=registry,ref=git.farh.net/groombook/cache:reset + cache-to: type=registry,ref=git.farh.net/groombook/cache:reset,mode=max - name: Build and push Web image uses: docker/build-push-action@v6 @@ -220,10 +220,10 @@ jobs: file: apps/web/Dockerfile push: true tags: | - ghcr.io/groombook/web:${{ steps.version.outputs.tag }} - ${{ github.ref == 'refs/heads/main' && 'ghcr.io/groombook/web:latest' || '' }} - cache-from: type=gha - cache-to: type=gha,mode=max + git.farh.net/groombook/web:${{ steps.version.outputs.tag }} + ${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/web:latest' || '' }} + cache-from: type=registry,ref=git.farh.net/groombook/cache:web + cache-to: type=registry,ref=git.farh.net/groombook/cache:web,mode=max deploy-dev: name: Deploy PR to groombook-dev @@ -264,7 +264,7 @@ jobs: restartPolicy: Never containers: - name: migrate - image: ghcr.io/groombook/migrate:$TAG + image: git.farh.net/groombook/migrate:$TAG env: - name: DATABASE_URL valueFrom: @@ -276,8 +276,8 @@ jobs: -n groombook-dev --timeout=120s # Update deployments - kubectl set image deployment/api api=ghcr.io/groombook/api:$TAG -n groombook-dev - kubectl set image deployment/web web=ghcr.io/groombook/web:$TAG -n groombook-dev + kubectl set image deployment/api api=git.farh.net/groombook/api:$TAG -n groombook-dev + kubectl set image deployment/web web=git.farh.net/groombook/web:$TAG -n groombook-dev # Wait for rollout kubectl rollout status deployment/api -n groombook-dev --timeout=300s @@ -378,11 +378,11 @@ jobs: echo "Updating migration/seed Job names with SHA: $SHORT_SHA" cd /tmp/infra DEV_KUST="apps/overlays/dev/kustomization.yaml" - yq -i '(.images[] | select(.name == "ghcr.io/groombook/api")).newTag = env(TAG)' "$DEV_KUST" - yq -i '(.images[] | select(.name == "ghcr.io/groombook/web")).newTag = env(TAG)' "$DEV_KUST" - yq -i '(.images[] | select(.name == "ghcr.io/groombook/migrate")).newTag = env(TAG)' "$DEV_KUST" - yq -i '(.images[] | select(.name == "ghcr.io/groombook/seed")).newTag = env(TAG)' "$DEV_KUST" - yq -i '(.images[] | select(.name == "ghcr.io/groombook/reset")).newTag = env(TAG)' "$DEV_KUST" + yq -i '(.images[] | select(.name == "git.farh.net/groombook/api")).newTag = env(TAG)' "$DEV_KUST" + yq -i '(.images[] | select(.name == "git.farh.net/groombook/web")).newTag = env(TAG)' "$DEV_KUST" + yq -i '(.images[] | select(.name == "git.farh.net/groombook/migrate")).newTag = env(TAG)' "$DEV_KUST" + yq -i '(.images[] | select(.name == "git.farh.net/groombook/seed")).newTag = env(TAG)' "$DEV_KUST" + yq -i '(.images[] | select(.name == "git.farh.net/groombook/reset")).newTag = env(TAG)' "$DEV_KUST" # Update migrate Job name to include short SHA (immutable template fix) MIGRATE_JOB="apps/base/migrate-job.yaml"