From 76e8646c7c02ec4f8c451a3ddaf10d0d6b483f85 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Mon, 6 Jul 2026 03:49:11 +0530 Subject: [PATCH] fix(ci): switch from GHCR to Forgejo registry - Update workflow to push to ci.nxtgauge.com/ashwin/* - Use FORGEJO_USERNAME and FORGEJO_TOKEN secrets - Fix gitops repo cloning to use x-access-token - Add ai-assistant to deployment scripts --- ...y-ghcr.yml => build-and-deploy-forgejo.yml} | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) rename .github/workflows/{build-and-deploy-ghcr.yml => build-and-deploy-forgejo.yml} (85%) diff --git a/.github/workflows/build-and-deploy-ghcr.yml b/.github/workflows/build-and-deploy-forgejo.yml similarity index 85% rename from .github/workflows/build-and-deploy-ghcr.yml rename to .github/workflows/build-and-deploy-forgejo.yml index 59926c5..0bc1d9f 100644 --- a/.github/workflows/build-and-deploy-ghcr.yml +++ b/.github/workflows/build-and-deploy-forgejo.yml @@ -1,4 +1,4 @@ -name: build-and-deploy-ghcr +name: build-and-deploy-forgejo on: push: @@ -14,6 +14,8 @@ permissions: env: K8S_NAMESPACE: nxtgauge GITOPS_REPO: Traceworks2023/nxtgauge-gitops + REGISTRY: ci.nxtgauge.com + REGISTRY_USER: ashwin jobs: build-deploy: @@ -52,12 +54,12 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to GHCR + - name: Login to Forgejo Registry uses: docker/login-action@v3 with: - registry: ghcr.io - username: ${{ secrets.GHCR_USERNAME }} - password: ${{ secrets.DEPLOY_GITHUB_TOKEN }} + registry: ci.nxtgauge.com + username: ${{ secrets.FORGEJO_USERNAME }} + password: ${{ secrets.FORGEJO_TOKEN }} - name: Build and push image id: build @@ -69,7 +71,7 @@ jobs: platforms: linux/amd64 build-args: | SERVICE_NAME=${{ matrix.service }} - tags: ghcr.io/traceworks2023/nxtgauge-rust-${{ matrix.service }}:${{ github.sha }} + tags: ci.nxtgauge.com/ashwin/nxtgauge-rust-${{ matrix.service }}:${{ github.sha }} - name: Sync GitOps release env: @@ -77,8 +79,8 @@ jobs: run: | set -euo pipefail workdir="$(mktemp -d /tmp/nxtgauge-gitops.XXXXXX)" - trap 'rm -rf "$workdir"' EXIT - git clone "https://${{ secrets.GHCR_USERNAME }}:${GITOPS_TOKEN}@github.com/${GITOPS_REPO}.git" "$workdir" + trap 'rm -rf \"$workdir\"' EXIT + git clone "https://x-access-token:${GITOPS_TOKEN}@github.com/${GITOPS_REPO}.git" "$workdir" cd "$workdir" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com"