Skip to content

Fix Docker builds and add Railway root config #5

Fix Docker builds and add Railway root config

Fix Docker builds and add Railway root config #5

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install
run: bun install --frozen-lockfile
- name: Format
run: bun run format:check
- name: Typecheck
run: bun run typecheck
- name: Test
run: bun test
# The web app has its own tsconfig (JSX, Next types) and is excluded from
# the root typecheck, so it needs its own build to be covered at all.
- name: Build the PWA
run: bun run --filter '@outreachgraph/web' build
# Proves the committed migrations apply to an empty database, which is
# what every deploy does before the new image serves traffic.
- name: Migrations apply cleanly
run: bun run db:migrate
env:
TURSO_DATABASE_URL: file:./ci.db
- name: Migrations are idempotent
run: bun run db:status
env:
TURSO_DATABASE_URL: file:./ci.db
docker:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
service: [api, web, worker]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
# Build only — publishing is Railway's job. This catches a Dockerfile
# that references a file the repository no longer has.
- name: Build ${{ matrix.service }} image
uses: docker/build-push-action@v6
with:
context: .
file: docker/${{ matrix.service }}.Dockerfile
push: false
cache-from: type=gha
cache-to: type=gha,mode=max