fix(ci): switch from GHCR to Forgejo registry
Some checks failed
build-and-release / build (push) Failing after 1m4s
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:
parent
2402b1f7e4
commit
8f20efae1f
1 changed files with 7 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
name: build-and-deploy-ghcr
|
name: build-and-deploy-forgejo
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -12,7 +12,7 @@ permissions:
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: ghcr.io/traceworks2023/${{ github.event.repository.name }}
|
IMAGE_NAME: ci.nxtgauge.com/ashwin/nxtgauge-ai-assistant
|
||||||
K8S_NAMESPACE: nxtgauge-ai
|
K8S_NAMESPACE: nxtgauge-ai
|
||||||
DEPLOYMENT_NAME: nxtgauge-ai-assistant
|
DEPLOYMENT_NAME: nxtgauge-ai-assistant
|
||||||
CONTAINER_NAME: ai-assistant
|
CONTAINER_NAME: ai-assistant
|
||||||
|
|
@ -31,12 +31,12 @@ jobs:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to GHCR
|
- name: Login to Forgejo Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ci.nxtgauge.com
|
||||||
username: ${{ secrets.GHCR_USERNAME }}
|
username: ${{ secrets.FORGEJO_USERNAME }}
|
||||||
password: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
id: build
|
id: build
|
||||||
|
|
@ -56,7 +56,7 @@ jobs:
|
||||||
image_ref="${IMAGE_NAME}@${{ steps.build.outputs.digest }}"
|
image_ref="${IMAGE_NAME}@${{ steps.build.outputs.digest }}"
|
||||||
workdir="$(mktemp -d /tmp/nxtgauge-gitops.XXXXXX)"
|
workdir="$(mktemp -d /tmp/nxtgauge-gitops.XXXXXX)"
|
||||||
trap 'rm -rf "$workdir"' EXIT
|
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"
|
cd "$workdir"
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
Loading…
Add table
Reference in a new issue