Files
dezky/.gitea/workflows/ci.yml
T
Ronni Baslund c814bfdf3b
ci / typecheck (map[dir:services/platform-api name:platform-api]) (push) Successful in 20s
ci / test (push) Failing after 12m29s
ci / typecheck (map[dir:apps/website name:website]) (push) Failing after 12m55s
ci / typecheck (map[dir:apps/portal name:portal]) (push) Failing after 14m6s
ci / typecheck (map[dir:apps/booking name:booking]) (push) Failing after 14m8s
ci / build (map[dir:services/platform-api name:platform-api]) (push) Failing after 14m4s
ci / build (map[dir:apps/portal name:portal]) (push) Failing after 14m54s
ci / build (map[dir:apps/booking name:booking]) (push) Failing after 14m56s
feat(ci): build + push app images to the Gitea registry
After typecheck + test pass on main, build portal/booking/platform-api images
(matrix) via the dind sidecar and push to git.lastcloud.io tagged latest + SHA.
Auth uses the runner's job token against the same Gitea instance.
2026-06-09 09:02:36 +02:00

78 lines
2.5 KiB
YAML

# CI for the dezky monorepo (Gitea Actions). Installs deps and typechecks each
# app/service independently — the repo is NOT a single pnpm workspace yet, so
# every app has its own lockfile and is built from its own directory.
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
typecheck:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- { name: platform-api, dir: services/platform-api }
- { name: portal, dir: apps/portal }
- { name: booking, dir: apps/booking }
- { name: website, dir: apps/website }
defaults:
run:
working-directory: ${{ matrix.target.dir }}
steps:
- uses: actions/checkout@v4
# Node comes from the runner image (catthehacker ships node 24) — NOT
# actions/setup-node, whose shared tool-cache races across concurrent jobs
# ("node: Text file busy"). corepack (bundled with node) reads each app's
# own packageManager — what this per-app monorepo (no root package.json) needs.
- name: Install
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Typecheck
run: pnpm typecheck
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: services/platform-api
steps:
- uses: actions/checkout@v4
- name: Install
run: |
corepack enable
pnpm install --frozen-lockfile
- name: Test
run: pnpm test
# Build + push app images to the Gitea container registry. Only on main, after
# typecheck + test pass. Uses the runner's job token to auth to the registry
# (same Gitea instance), and the dind sidecar for docker build.
build:
runs-on: ubuntu-latest
needs: [typecheck, test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
app:
- { name: portal, dir: apps/portal }
- { name: booking, dir: apps/booking }
- { name: platform-api, dir: services/platform-api }
steps:
- uses: actions/checkout@v4
- name: Registry login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.lastcloud.io -u "${{ github.actor }}" --password-stdin
- name: Build + push
run: |
IMG=git.lastcloud.io/ronnibaslund/dezky/${{ matrix.app.name }}
docker build -t "$IMG:latest" -t "$IMG:${{ github.sha }}" "${{ matrix.app.dir }}"
docker push "$IMG:latest"
docker push "$IMG:${{ github.sha }}"