From 59ea9557d1f39d485bd334dde9f44621440b8be6 Mon Sep 17 00:00:00 2001 From: Ryan Moon Date: Thu, 2 Apr 2026 19:50:53 -0500 Subject: [PATCH] fix: use REGISTRY and GIT_REMOTE vars, point to git2.lunarfront.tech --- .gitea/workflows/build.yml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index db3334a..9e89116 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -13,6 +13,9 @@ jobs: build: runs-on: ubuntu-latest if: "!startsWith(github.event.head_commit.message, 'chore: bump version')" + env: + REGISTRY: git2.lunarfront.tech + GIT_REMOTE: git2.lunarfront.tech steps: - name: Checkout @@ -50,7 +53,7 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Login to registry - run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login registry.lunarfront.tech -u ryan --password-stdin + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login $REGISTRY -u ryan --password-stdin - name: Build and push backend run: | @@ -58,32 +61,32 @@ jobs: SHA=$(git rev-parse --short HEAD) docker build \ --build-arg APP_VERSION=$VERSION \ - -t registry.lunarfront.tech/ryan/lunarfront-app:$VERSION \ - -t registry.lunarfront.tech/ryan/lunarfront-app:$SHA \ - -t registry.lunarfront.tech/ryan/lunarfront-app:latest \ + -t $REGISTRY/ryan/lunarfront-app:$VERSION \ + -t $REGISTRY/ryan/lunarfront-app:$SHA \ + -t $REGISTRY/ryan/lunarfront-app:latest \ -f Dockerfile . - docker push registry.lunarfront.tech/ryan/lunarfront-app:$VERSION - docker push registry.lunarfront.tech/ryan/lunarfront-app:$SHA - docker push registry.lunarfront.tech/ryan/lunarfront-app:latest + docker push $REGISTRY/ryan/lunarfront-app:$VERSION + docker push $REGISTRY/ryan/lunarfront-app:$SHA + docker push $REGISTRY/ryan/lunarfront-app:latest - name: Build and push frontend run: | VERSION=${{ steps.version.outputs.version }} SHA=$(git rev-parse --short HEAD) docker build \ - -t registry.lunarfront.tech/ryan/lunarfront-frontend:$VERSION \ - -t registry.lunarfront.tech/ryan/lunarfront-frontend:$SHA \ - -t registry.lunarfront.tech/ryan/lunarfront-frontend:latest \ + -t $REGISTRY/ryan/lunarfront-frontend:$VERSION \ + -t $REGISTRY/ryan/lunarfront-frontend:$SHA \ + -t $REGISTRY/ryan/lunarfront-frontend:latest \ -f Dockerfile.frontend . - docker push registry.lunarfront.tech/ryan/lunarfront-frontend:$VERSION - docker push registry.lunarfront.tech/ryan/lunarfront-frontend:$SHA - docker push registry.lunarfront.tech/ryan/lunarfront-frontend:latest + docker push $REGISTRY/ryan/lunarfront-frontend:$VERSION + docker push $REGISTRY/ryan/lunarfront-frontend:$SHA + docker push $REGISTRY/ryan/lunarfront-frontend:latest - name: Commit version bump run: | git config user.name "lunarfront-bot" git config user.email "bot@lunarfront.tech" - git remote set-url origin https://lunarfront-bot:${{ secrets.BOT_TOKEN }}@git.lunarfront.tech/ryan/lunarfront-app.git + git remote set-url origin https://lunarfront-bot:${{ secrets.BOT_TOKEN }}@$GIT_REMOTE/ryan/lunarfront-app.git git add packages/backend/package.json git commit -m "chore: bump version to v${{ steps.version.outputs.version }}" git pull --rebase origin main @@ -91,4 +94,4 @@ jobs: - name: Logout if: always() - run: docker logout registry.lunarfront.tech + run: docker logout $REGISTRY