ci: derive image name + package linking from repo, add link step
Both workflows had a static IMAGE env (<owner>/<product>-docs-mcp)
and a static --package arg in the GC step. Switch both to Gitea
Actions context variables so a clone of the template into any repo
name works on the first CI run without find/replace:
IMAGE: ${{ github.repository_owner }}/${{ github.event.repository.name }}
--owner ${{ github.repository_owner }}
--package ${{ github.event.repository.name }}
Also add the "Link container package to this repo" step that was
missing from the template (and which, naively copy-pasted from the
reference build, would have linked everything back to docs-mcp-
template). The new step derives owner + package + link-target all
from the running repo's context.
The github.* namespace is Gitea Actions' inherited GitHub-Actions
context — values come from the Gitea server, not github.com. Same
mechanism the reference build's $GITHUB_SHA tag-builder uses.
CLAUDE.md updated to note that image and package naming are
repo-derived; only registry endpoints and the Ollama URL need
per-clone editing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -157,6 +157,23 @@ throughout. Set it on first build. References show up in:
|
||||
Use lowercase, underscores not hyphens, since it ends up in tool
|
||||
identifiers that the LLM reads.
|
||||
|
||||
### Image name and package linking are repo-name-derived
|
||||
|
||||
You do NOT need to edit the IMAGE env or the `--package` arg in the
|
||||
workflows. Both derive from the repo at runtime via
|
||||
`${{ github.repository_owner }}` and
|
||||
`${{ github.event.repository.name }}`. So a clone into a repo named
|
||||
`my-product-docs` automatically pushes the container as
|
||||
`<owner>/my-product-docs:latest` and links the package to its own
|
||||
repo. (`github.*` is Gitea Actions' inherited GitHub-Actions
|
||||
namespace — the values come from the Gitea server, no github.com
|
||||
involvement.)
|
||||
|
||||
The only workflow placeholders you still have to replace per clone
|
||||
are the registry endpoints (`REGISTRY_PUSH`, `REGISTRY_PULL`) and
|
||||
the Ollama URL, because those depend on the deployment environment,
|
||||
not the repo identity.
|
||||
|
||||
## Common commands
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user