ci(gitea): add build workflow for self-hosted runner
Runs typecheck, lint, and build on every push to main and on pull requests. Targets the self-hosted Gitea Actions runner (crispygoat-host-runner) using labels [self-hosted, linux, ubuntu-latest]. Uses the local dev stack endpoints (PostgREST on :3001, MinIO on :9000, Postgres on :5432) for env vars so no secrets need to be wired in.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [self-hosted, linux, ubuntu-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Apply fix-agents.js patch
|
||||
run: node fix-agents.js
|
||||
|
||||
- name: Typecheck
|
||||
env:
|
||||
NEXT_PUBLIC_API_URL: http://localhost:3001
|
||||
NEXT_PUBLIC_STORAGE_BASE_URL: http://localhost:9000
|
||||
STORAGE_ENDPOINT: http://localhost:9000
|
||||
DATABASE_URL: postgresql://routecommerce:routecommerce_dev_password@127.0.0.1:5432/route_commerce
|
||||
run: npm run type-check
|
||||
|
||||
- name: Lint
|
||||
env:
|
||||
NEXT_PUBLIC_API_URL: http://localhost:3001
|
||||
NEXT_PUBLIC_STORAGE_BASE_URL: http://localhost:9000
|
||||
STORAGE_ENDPOINT: http://localhost:9000
|
||||
DATABASE_URL: postgresql://routecommerce:routecommerce_dev_password@127.0.0.1:5432/route_commerce
|
||||
run: npm run lint
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
NEXT_PUBLIC_API_URL: http://localhost:3001
|
||||
NEXT_PUBLIC_STORAGE_BASE_URL: http://localhost:9000
|
||||
STORAGE_ENDPOINT: http://localhost:9000
|
||||
DATABASE_URL: postgresql://routecommerce:routecommerce_dev_password@127.0.0.1:5432/route_commerce
|
||||
run: npm run build
|
||||
Reference in New Issue
Block a user