From 2b3fd214d8f4099d2f335e29bfa13e7292851dfb Mon Sep 17 00:00:00 2001 From: default Date: Fri, 5 Jun 2026 23:00:10 +0000 Subject: [PATCH] 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. --- .gitea/workflows/build.yml | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..3a994bb --- /dev/null +++ b/.gitea/workflows/build.yml @@ -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