diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0ee881f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +.git +**/node_modules +**/.venv +**/__pycache__ +dist +web/dist +.env +.env.* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6dca01..fcae3be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# Adopted from ToolFactory 0.1.2 to declare reusable-workflow permissions. +# Adopted from ToolFactory 0.1.2 for workflow permissions and container inputs. # `gate` decides once which registries this tag can publish to (a job-level `if` cannot read # secrets) and every leg obeys its output, so a tag with no secrets is still green: gate, # package, the Release, and whatever else applies. After adding a secret, re-run with @@ -245,6 +245,16 @@ jobs: - uses: actions/checkout@v7 with: ref: ${{ needs.gate.outputs.sha }} + - uses: actions/setup-node@v7 + with: + node-version: "24" + - uses: astral-sh/setup-uv@v6 + with: + python-version: "3.12" + - name: install + run: uv sync --frozen + - name: generate container build inputs + run: npx --yes toolfactory@0.1.2 build - uses: docker/login-action@v4 with: registry: ghcr.io @@ -262,6 +272,13 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + - name: container runtime smoke + env: + IMAGE: ghcr.io/goatinahat/papervizagent:${{ steps.meta.outputs.version }} + run: >- + docker run --rm --entrypoint python "$IMAGE" -c + 'from importlib.resources import files; from papervizagent.toolfactory.cli import main; + assert (files("papervizagent") / "web/index.html").is_file(); main(["status"])' publish-mcp-registry: needs: - gate diff --git a/Dockerfile b/Dockerfile index 164e3b6..b576ebf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # syntax=docker/dockerfile:1 +# Run `make build` first to generate the web operations schema. FROM node:24-alpine AS web WORKDIR /app COPY web/package.json web/package-lock.json ./web/ diff --git a/RELEASING.md b/RELEASING.md index 501fd50..75d8a11 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -50,3 +50,7 @@ wheel/sdist/MCPB contents and launch the MCPB staging directory with `uv run` from outside the repository. Live Codex tests are recorded under `evals/`; API provider credentials are not required for CI; provider wire tests use mocks, while the Codex path has live end-to-end coverage. + +Before a local `docker build`, run `make build` to generate the web operations +schema. The release container job performs this step, then checks that the built +image starts the CLI and contains the compiled web interface.