12 Commits

Author SHA1 Message Date
628c090dfd Merge pull request 'fix/ci-only-on-pr' (#1) from fix/ci-only-on-pr into main
Some checks failed
Build & Release / build (push) Failing after 7s
Reviewed-on: https://git2.lunarfront.tech/ryan/lunarfront-app/pulls/1
2026-04-03 00:47:43 +00:00
Ryan Moon
9fc42b7881 fix: set DOCKER_HOST for e2e job to use dind TCP endpoint
All checks were successful
CI / ci (pull_request) Successful in 29s
CI / e2e (pull_request) Successful in 58s
2026-04-02 19:09:30 -05:00
Ryan Moon
ce3ac3dfc0 fix: allow backend package.json through frontend dockerignore for workspace resolution 2026-04-02 07:01:21 -05:00
Ryan Moon
75bc10fe3c fix: add concurrency group to prevent build runs from cancelling each other 2026-04-02 06:53:24 -05:00
Ryan Moon
d821302439 fix: copy backend package.json in frontend Dockerfile for workspace resolution 2026-04-01 22:16:23 -05:00
Ryan Moon
8eb116a9a1 fix: move Docker builds before version bump commit to prevent self-cancellation 2026-04-01 22:14:10 -05:00
Ryan Moon
038ea22068 fix: exclude admin src from Docker context but keep package.json for workspace resolution 2026-04-01 22:10:54 -05:00
Ryan Moon
c236059ce1 fix: use --filter to install only backend workspace, avoiding missing admin package.json 2026-04-01 22:10:14 -05:00
Ryan Moon
67f8881b3c fix: copy admin package.json in backend Dockerfile for workspace resolution 2026-04-01 22:04:29 -05:00
Ryan Moon
1df4bb15a8 fix: remove redundant Docker CLI install — catthehacker image includes it 2026-04-01 21:55:58 -05:00
Ryan Moon
ddabcf19d1 fix: rebase before pushing version bump to avoid race with CI 2026-04-01 21:52:37 -05:00
Ryan Moon
9c8ceba461 fix: only run CI on pull requests, not on push to main 2026-04-01 21:47:20 -05:00
6 changed files with 20 additions and 21 deletions

View File

@@ -6,6 +6,7 @@ planning
deploy deploy
infra infra
packages/admin packages/admin
!packages/admin/package.json
Dockerfile* Dockerfile*
docker-compose* docker-compose*
*.md *.md

View File

@@ -5,6 +5,10 @@ on:
branches: [main] branches: [main]
workflow_dispatch: workflow_dispatch:
concurrency:
group: build
cancel-in-progress: false
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -45,25 +49,6 @@ jobs:
") ")
echo "version=$VERSION" >> $GITHUB_OUTPUT echo "version=$VERSION" >> $GITHUB_OUTPUT
- 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 add packages/backend/package.json
git commit -m "chore: bump version to v${{ steps.version.outputs.version }}"
git push origin main
- name: Install Docker CLI
run: |
apt-get update -qq
apt-get install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo $VERSION_CODENAME) stable" > /etc/apt/sources.list.d/docker.list
apt-get update -qq
apt-get install -y docker-ce-cli
- name: Login to registry - 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.lunarfront.tech -u ryan --password-stdin
@@ -94,6 +79,16 @@ jobs:
docker push registry.lunarfront.tech/ryan/lunarfront-frontend:$SHA docker push registry.lunarfront.tech/ryan/lunarfront-frontend:$SHA
docker push registry.lunarfront.tech/ryan/lunarfront-frontend:latest docker push registry.lunarfront.tech/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 add packages/backend/package.json
git commit -m "chore: bump version to v${{ steps.version.outputs.version }}"
git pull --rebase origin main
git push origin main
- name: Logout - name: Logout
if: always() if: always()
run: docker logout registry.lunarfront.tech run: docker logout registry.lunarfront.tech

View File

@@ -1,8 +1,6 @@
name: CI name: CI
on: on:
push:
branches: [main]
pull_request: pull_request:
branches: [main] branches: [main]
workflow_dispatch: workflow_dispatch:
@@ -32,6 +30,8 @@ jobs:
e2e: e2e:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: ci needs: ci
env:
DOCKER_HOST: tcp://localhost:2375
steps: steps:
- name: Checkout - name: Checkout

View File

@@ -3,6 +3,7 @@ WORKDIR /app
COPY package.json bun.lock ./ COPY package.json bun.lock ./
COPY packages/shared/package.json packages/shared/ COPY packages/shared/package.json packages/shared/
COPY packages/backend/package.json packages/backend/ COPY packages/backend/package.json packages/backend/
COPY packages/admin/package.json packages/admin/
RUN bun install --frozen-lockfile RUN bun install --frozen-lockfile
FROM oven/bun:1.3.11-alpine AS build FROM oven/bun:1.3.11-alpine AS build

View File

@@ -3,6 +3,7 @@ WORKDIR /app
COPY package.json bun.lock ./ COPY package.json bun.lock ./
COPY packages/shared/package.json packages/shared/ COPY packages/shared/package.json packages/shared/
COPY packages/admin/package.json packages/admin/ COPY packages/admin/package.json packages/admin/
COPY packages/backend/package.json packages/backend/
RUN bun install --frozen-lockfile RUN bun install --frozen-lockfile
FROM oven/bun:1.3.11-alpine AS build FROM oven/bun:1.3.11-alpine AS build

View File

@@ -6,6 +6,7 @@ planning
deploy deploy
infra infra
packages/backend packages/backend
!packages/backend/package.json
Dockerfile* Dockerfile*
docker-compose* docker-compose*
*.md *.md