227e26c8db
Build and Push Docker Image / build (push) Successful in 23s
ECHO as 14 typed MCP tools (streamable HTTP, stateless JSON, bearer auth, open /health) wrapping the 2.1.1 *_op cores in-process: - mcp-server/app.py: FastMCP app; duplicate gate + offline queueing surface as DATA (merge_into/force are parameters, never blind retries); recall packs excerpts into budget_chars by score; get_note is traversal-guarded with section/max_chars; patch_note enriches invalid-target errors with the note's actual headings; log_session wraps the session-end bundle (heartbeat-last); ECHO_MCP_TOOLS=core exposes only the six daily drivers; all MCP writes serialize in-process; startup fails fast on missing env. - Dockerfile (legacy format — no BuildKit on the CI runner), python:3.12-slim, healthcheck probes 127.0.0.1; .dockerignore keeps the context lean. - .gitea/workflows/docker-build.yml: standard image build; PORT redeploy trigger targets the echo-mcp container explicitly (repo name is echo). - deploy.unraid.yml: br0/auto-IP, /data volume, vault adjacency (ECHO_BASE=http://10.2.0.35:27123), secrets as SECRET: refs. - SKILL.md: prefer the echo_* tools when the connector is present; CLI recipes stay as the fallback. Spec header marked BUILT (tool count corrected to 14). - eval/test_mcp_server.py: e2e over real streamable HTTP (health/auth/ initialize/tools-list + capture->gate->merge->recall->log_session); skips cleanly when the SDK is absent. All seven suites green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
51 lines
1.7 KiB
YAML
51 lines
1.7 KiB
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
# Runs on the forgerunner host: bundled Docker CLI + mounted /var/run/docker.sock.
|
|
runs-on: host
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: registry.alwisp.com
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
run: |
|
|
IMAGE="registry.alwisp.com/${{ gitea.repository }}"
|
|
GIT_SHA="$(git rev-parse --short HEAD)"
|
|
COMMIT_COUNT="$(git rev-list --count HEAD)"
|
|
docker build \
|
|
--label org.alwisp.git-sha="${{ gitea.sha }}" \
|
|
--label org.alwisp.version="v2.${COMMIT_COUNT}" \
|
|
--label org.alwisp.repo="${{ gitea.repository }}" \
|
|
-t "${IMAGE}:latest" .
|
|
docker push "${IMAGE}:latest"
|
|
|
|
# Dangling-only prune: removes untagged leftovers from previous builds. Never
|
|
# removes the tagged :latest or any image referenced by a running container.
|
|
- name: Prune dangling images on host
|
|
if: always()
|
|
run: docker image prune -f 2>/dev/null || true
|
|
|
|
- name: Trigger PORT redeploy
|
|
if: success()
|
|
run: |
|
|
# Repo is 'echo' but the container is 'echo-mcp' — target it explicitly.
|
|
curl -fsS -X POST https://port.alwisp.com/hooks/gitea \
|
|
-H "X-Deploy-Token: ${{ secrets.WEBHOOK_SECRET }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"container":"echo-mcp"}' || echo "PORT redeploy trigger failed (non-fatal)"
|