fix(ci): switch from GHCR to Forgejo registry
Some checks failed
build-and-release / build (push) Failing after 1m15s
Some checks failed
build-and-release / build (push) Failing after 1m15s
- Update workflow to push to ci.nxtgauge.com/ashwin/nxtgauge-admin-solid - Use FORGEJO_USERNAME and FORGEJO_TOKEN secrets - Fix gitops repo cloning to use x-access-token
This commit is contained in:
parent
43d181bf5a
commit
fa9e221fe3
1 changed files with 7 additions and 7 deletions
|
|
@ -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-admin-solid
|
||||
K8S_NAMESPACE: nxtgauge
|
||||
DEPLOYMENT_NAME: nxtgauge-admin-solid
|
||||
CONTAINER_NAME: admin-solid
|
||||
|
|
@ -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"
|
||||
Loading…
Add table
Reference in a new issue