* feat: CI smoke-test foundation (probe + docker compose + rule updates) Phase 1 of multi-repo CI initiative for catching plugin/seeder integration failures (ADR-0002 id drift, missing mapWebsocketPayload, namespace collisions, BOM in package.json) that current CI misses. - packages/wwv-ci-probe: shared CLI with `seeder`, `ws`, `id-contract` subcommands. README documents why no `plugin` subcommand (Playwright belongs in wwv-plugins, not coupled to this probe). `files` + `prepublishOnly` configured for clean npm publish. - docker/ci/: reusable docker-compose stacks for plugin-CI and seeder-CI, plus mock-upstream HTTP fixture server and CI-only stub-seeder. Compose comments document scope boundary (consumer workflow owns user/plugin-row injection via Playwright globalSetup pattern) and the deferred stub-seeder bake-in for wwv-data-engine. - .github/workflows/docker-publish.yml: adds `:ci` tag alias for downstream consumers (one-line edit). - .agents/rules/*: rename worldwideview-plugins → wwv-plugins (4 files) to reflect repo rename + clarify it lives at local-plugins/ as its own git working tree. Bump 2.15.16 → 2.16.0 (Minor — new ci-probe package + new docker/ci infrastructure are net-new features for the CI ecosystem). Foundation has NOT been booted end-to-end yet — ghcr.io/silvertakana/ worldwideview:ci doesn't exist until this lands on main and the workflow publishes. Next session: validate via real compose-up, then mirror the :ci tag in wwv-data-engine repo and wire consumer workflows in wwv-plugins. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor(ci-probe): extract shared payload-shape validator with contract tests * fix(ci): add /__health route to mock-upstream and gate engine on service_healthy * chore: bump version to 2.48.18 for CI foundation landing * chore: bump to 2.48.19 and reconcile lockfile after merging main (validateManifest fix) --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
87 lines
2.8 KiB
YAML
87 lines
2.8 KiB
YAML
name: Docker Image CI
|
|
|
|
# Only rebuild the image when files that affect the final container change.
|
|
# Doc/agent-rules/test-only changes skip the expensive multi-stage build.
|
|
# Skipped workflow runs satisfy GitHub required status checks (neutral pass).
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- "src/**"
|
|
- "prisma/**"
|
|
- "packages/**"
|
|
- "scripts/**"
|
|
- "Dockerfile"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "next.config.ts"
|
|
- ".github/workflows/docker-publish.yml"
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- "src/**"
|
|
- "prisma/**"
|
|
- "packages/**"
|
|
- "scripts/**"
|
|
- "Dockerfile"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "next.config.ts"
|
|
- ".github/workflows/docker-publish.yml"
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
|
|
jobs:
|
|
build-and-push-image:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v4
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v6
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
tags: |
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
type=raw,value=ci,enable={{is_default_branch}}
|
|
type=ref,event=branch
|
|
type=sha,format=short
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
build-args: |
|
|
NEXT_PUBLIC_CESIUM_ION_TOKEN=${{ secrets.NEXT_PUBLIC_CESIUM_ION_TOKEN }}
|
|
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=${{ secrets.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY }}
|
|
NEXT_PUBLIC_BING_MAPS_KEY=${{ secrets.NEXT_PUBLIC_BING_MAPS_KEY }}
|
|
NEXT_PUBLIC_WWV_EDITION=${{ vars.NEXT_PUBLIC_WWV_EDITION || 'local' }}
|
|
NEXT_PUBLIC_WS_ENGINE_URL=${{ vars.NEXT_PUBLIC_WS_ENGINE_URL }}
|
|
NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL=${{ vars.NEXT_PUBLIC_WWV_PLUGIN_DATA_ENGINE_URL }}
|
|
NEXT_PUBLIC_ADSENSE_CLIENT_ID=${{ secrets.NEXT_PUBLIC_ADSENSE_CLIENT_ID }}
|
|
NEXT_PUBLIC_SUPABASE_URL=${{ vars.NEXT_PUBLIC_SUPABASE_URL }}
|
|
NEXT_PUBLIC_SUPABASE_ANON_KEY=${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
|