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:
@@ -23,7 +23,12 @@ env:
|
|||||||
IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }}
|
IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }}
|
||||||
OLLAMA_URL: http://<gpu-host>:11434
|
OLLAMA_URL: http://<gpu-host>:11434
|
||||||
EMBED_MODEL: nomic-embed-text
|
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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -34,7 +34,12 @@ env:
|
|||||||
OLLAMA_URL: http://<gpu-host>:11434
|
OLLAMA_URL: http://<gpu-host>:11434
|
||||||
EMBED_MODEL: nomic-embed-text
|
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:
|
jobs:
|
||||||
refresh:
|
refresh:
|
||||||
|
|||||||
Reference in New Issue
Block a user