ci: default PRODUCT_NAME to repo name (caught by template dispatch test)

First dispatch on the empty template failed at Chroma collection
creation because PRODUCT_NAME was the literal string "<product>"
(YAML doesn't expand placeholders), and Chroma rejects collection
names containing characters outside [a-zA-Z0-9._-]:

  chromadb.errors.InvalidArgumentError: Validation error: name:
  Expected a name containing 3-512 characters from [a-zA-Z0-9._-],
  starting and ending with a character in [a-zA-Z0-9]. Got:
  <product>_docs

Same fix as the IMAGE env: derive from the repo name dynamically
via ${{ github.event.repository.name }}. Cloners can still override
explicitly, but a fresh clone now runs the index-rebuild step
cleanly out of the box.

Verified by re-dispatch — should fail next at docker login (placeholder
REGISTRY_PUSH hostname), which is the next-expected fail point and a
real per-deployment config the cloner has to fill in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 09:37:07 -04:00
parent 33b0fd652e
commit 43728320bf
2 changed files with 12 additions and 2 deletions
+6 -1
View File
@@ -23,7 +23,12 @@ env:
IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }}
OLLAMA_URL: http://<gpu-host>:11434
EMBED_MODEL: nomic-embed-text
PRODUCT_NAME: <product>
# PRODUCT_NAME defaults to the repo name so a clone works without
# editing. Override here if you want a different identifier (e.g.
# repo "my-product-docs" → PRODUCT_NAME "myproduct"). Used as the
# Chroma collection name, BM25 db filename, and MCP server name —
# see docs_mcp/server.py.
PRODUCT_NAME: ${{ github.event.repository.name }}
jobs:
build:
+6 -1
View File
@@ -34,7 +34,12 @@ env:
OLLAMA_URL: http://<gpu-host>:11434
EMBED_MODEL: nomic-embed-text
PRODUCT_NAME: <product>
# PRODUCT_NAME defaults to the repo name so a clone works without
# editing. Override here if you want a different identifier (e.g.
# repo "my-product-docs" → PRODUCT_NAME "myproduct"). Used as the
# Chroma collection name, BM25 db filename, and MCP server name —
# see docs_mcp/server.py.
PRODUCT_NAME: ${{ github.event.repository.name }}
jobs:
refresh: