fix(ci): switch from GHCR to Forgejo registry
Some checks failed
build-and-release / build (push) Failing after 1m4s

- Update workflow to push to ci.nxtgauge.com/ashwin/nxtgauge-ai-assistant
- Use FORGEJO_USERNAME and FORGEJO_TOKEN secrets
- Fix gitops repo cloning to use x-access-token
This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-06 03:52:35 +05:30
parent 2402b1f7e4
commit 8f20efae1f

View file

@ -1,4 +1,4 @@
name: build-and-deploy-ghcr
name: build-and-deploy-forgejo
on:
push:
@ -12,7 +12,7 @@ permissions:
packages: write
env:
IMAGE_NAME: ghcr.io/traceworks2023/${{ github.event.repository.name }}
IMAGE_NAME: ci.nxtgauge.com/ashwin/nxtgauge-ai-assistant
K8S_NAMESPACE: nxtgauge-ai
DEPLOYMENT_NAME: nxtgauge-ai-assistant
CONTAINER_NAME: ai-assistant
@ -31,12 +31,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
@ -56,7 +56,7 @@ jobs:
image_ref="${IMAGE_NAME}@${{ steps.build.outputs.digest }}"
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"
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"