Files
worldwideview/.github/workflows/docker-publish.yml
Silvertakana e9a908840d fix(cli): polling plugins with --yes no longer require --seeder-tier (#210)
The --yes guard counted the conditionally-skipped seederTier prompt as a
missing required value, so `create <id> --architecture polling ... --yes`
failed even though seeders only apply to websocket plugins. The guard now
only requires seederTier when the resolved architecture is websocket.

This bug shipped in 1.3.0 and was missed in manual UAT (the polling case
was exercised interactively, not with --yes). The new test suite caught it.

Also in this change:
- Add packages/wwv-cli/test/create.test.mjs: 9 integration tests that spawn
  the built CLI into temp dirs and assert the scaffolded tree (polling vs
  websocket, community vs private seeder tier, billboard/model/point render,
  --core, kebab-id naming, icon mapping, and the --yes / invalid-flag /
  duplicate-dir failure guards). Uses Node's built-in test runner, no new deps.
- Add .github/workflows/cli.yml: path-scoped to packages/wwv-cli, runs
  build (tsc) + the integration tests. Fast versus the full app suite.
- Add paths-ignore for packages/wwv-cli to the heavy app workflows (ci,
  playwright, docker-publish, test-setup-scripts, test-local-dev push) so a
  CLI-only change runs just cli.yml instead of the whole suite.
- Bump CLI to 1.3.1 and add a test script.
2026-05-29 20:08:42 +12:00

68 lines
2.3 KiB
YAML

name: Docker Image CI
# CLI-only changes are covered by cli.yml; skip the image build for them.
on:
push:
branches: [ "main" ]
paths-ignore:
- "packages/wwv-cli/**"
pull_request:
branches: [ "main" ]
paths-ignore:
- "packages/wwv-cli/**"
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@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,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 }}