Merge pull request 'fix: use REGISTRY and GIT_REMOTE vars, point to git2.lunarfront.tech' (#2) from fix/ci-only-on-pr into main
Some checks failed
Build & Release / build (push) Failing after 8s

Reviewed-on: https://git2.lunarfront.tech/ryan/lunarfront-app/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
2026-04-03 01:27:02 +00:00

View File

@@ -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