fix: build workspace deps in CI, bump @luxfi/core for xrp type

- Dockerfile: copy and build pkg/core before app/server
- CI: build workspace dependencies before typecheck
- server.yml: use root context for Docker build
- Bump @luxfi/core to 10.0.6 (adds xrp NetworkType)
This commit is contained in:
2026-03-05 23:58:32 -08:00
parent b86d48a050
commit a02573c632
4 changed files with 20 additions and 8 deletions
+6
View File
@@ -5,11 +5,13 @@ on:
branches: [ main, develop ]
paths:
- 'app/server/**'
- 'pkg/core/**'
- '.github/workflows/bridge-server.yml'
pull_request:
branches: [ main, develop ]
paths:
- 'app/server/**'
- 'pkg/core/**'
- '.github/workflows/bridge-server.yml'
jobs:
@@ -52,6 +54,10 @@ jobs:
run: |
pnpm add -D @types/node winston
- name: Build workspace dependencies
working-directory: ./pkg/core
run: pnpm run build
- name: Run type check
working-directory: ./app/server
run: pnpm run typecheck
+4 -4
View File
@@ -5,7 +5,8 @@ on:
branches:
- main
paths:
- 'app/server/**' # Only trigger the workflow for changes in the server directory
- 'app/server/**'
- 'pkg/core/**'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
@@ -36,10 +37,9 @@ jobs:
run: |
docker login --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}" ghcr.io
- name: Run Docker build and push with pnpm script
- name: Run Docker build and push
run: |
docker buildx build --platform linux/amd64 -t ghcr.io/luxfi/bridge/server:latest -f docker/Dockerfile . --push
working-directory: app/server
docker buildx build --platform linux/amd64 -t ghcr.io/luxfi/bridge/server:latest -f app/server/Dockerfile . --push
- name: Set up kubectl
uses: azure/setup-kubectl@v3
+9 -3
View File
@@ -13,16 +13,19 @@ COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY .npmrc* ./
# Copy app package.json
# Copy workspace package.json files
COPY app/server/package.json ./app/server/
COPY pkg/core/package.json ./pkg/core/
# Install dependencies
RUN pnpm install --no-frozen-lockfile
# Copy source code
COPY pkg/core ./pkg/core
COPY app/server ./app/server
# Build the application
# Build workspace dependencies then the application
RUN cd pkg/core && pnpm run build
RUN cd app/server && pnpm run build
# Runtime stage
@@ -46,12 +49,15 @@ COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY .npmrc* ./
# Copy app package.json
# Copy workspace package.json files
COPY app/server/package.json ./app/server/
COPY pkg/core/package.json ./pkg/core/
# Install production dependencies only
RUN pnpm install --prod --no-frozen-lockfile
# Copy built workspace dependency
COPY --from=builder --chown=bridge:nodejs /app/pkg/core/dist ./pkg/core/dist
# Copy built application into workspace path so pnpm node_modules resolve correctly
COPY --from=builder --chown=bridge:nodejs /app/app/server/dist ./app/server/dist
# Copy prisma schema for generation
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@luxfi/core",
"version": "10.0.4",
"version": "10.0.6",
"description": "Core types and shared utilities related to blockchain",
"publishConfig": {
"registry": "https://registry.npmjs.org/",