From 12ee1f054ba85281bead455be8c80af046b43f05 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Wed, 20 May 2026 11:38:07 +0000 Subject: [PATCH] fix(ci): Docker push auth + E2E DinD networking for Gitea - Use git.farh.net registry with REGISTRY_TOKEN instead of ghcr.io/GITHUB_TOKEN - Migrate all image tags from ghcr.io/groombook/* to git.fars.net/groombook/* - Replace GHA cache with OCI registry cache (type=registry) - Replace tibdex/github-app-token with oauth2+REGISTRY_TOKEN for infra clone - Replace gh pr create/merge with Gitea API curl calls - Replace actions/github-script@v7 Comment on PR with Gitea issues API curl - Remove permissions: blocks from deploy-dev and cd jobs (Gitea-native) - Update deploy-dev kubectl image refs to git.farh.net/groombook/* Refs: GRO-1344 --- .github/workflows/ci.yml | 156 ++++++++++++++++++--------------------- 1 file changed, 73 insertions(+), 83 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf86865..d8dda36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,12 +152,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to GitHub Container Registry + - name: Log in to Gitea 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 @@ -167,10 +167,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 @@ -180,10 +180,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 @@ -193,10 +193,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 @@ -206,10 +206,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 @@ -218,19 +218,16 @@ 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 runs-on: runners-groombook needs: [docker] if: github.event_name == 'pull_request' - permissions: - contents: read - pull-requests: write steps: - name: Install kubectl run: | @@ -247,7 +244,6 @@ jobs: TAG="pr-$PR_NUM-${SHA::7}" echo "Deploying images tagged $TAG to groombook-dev..." - # Run migration with PR image kubectl delete job "migrate-pr-$PR_NUM" -n groombook-dev --ignore-not-found cat <