Skip to content

Publish the Docker image to GHCR on every release tag - #249

Merged
antiv merged 1 commit into
mainfrom
docker-image
Oct 14, 2026
Merged

antiv merged 1 commit into
mainfrom
docker-image

Conversation

@antiv

@antiv antiv commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Why

Running MATE in Docker meant cloning the repo and building the image locally with docker-compose up --build, because no image was published. A published image turns that into a single docker run. It may also count toward "Offers Easy Installation" on the LobeHub market listing, but LobeHub's rule for that isn't published.

Change

New .github/workflows/docker.yml:

  • Triggers:
    • a v* tag, the same trigger as release.yml
    • a manual run (workflow_dispatch)
  • Publishes: ghcr.io/antiv/mate for linux/amd64 and linux/arm64.
  • Tags:
    • 1.5.0, 1.5 and latest for a release
    • the branch name for a manual run
  • Smoke test first: it builds the image for the runner, starts it with AUTH_PASSWORD set, and waits up to 180 seconds for /health to answer. If it doesn't, the workflow prints the container log and pushes nothing.
  • Separate from release.yml, so a failed image build doesn't block the GitHub release, and the other way round.
  • Pinned and cached: third-party actions are pinned by commit, as in dependency-upgrade.yml. All are releases at least two weeks old. The build uses the GitHub Actions cache.
  • Permissions: contents: read, packages: write. Login uses GITHUB_TOKEN.

The README and docs/dev/deployment.md show the docker run command:

  • DB_PATH=data/my_agent_data.db with a volume on /app/data, so the SQLite database survives the container. Without it the database is in /app.
  • How to use the agents from an MCP client: MCP_EXPOSED_AGENTS, a personal access token, /agents/<agent>/mcp.

The CHANGELOG [Unreleased] has an Added entry.

Checked

GitHub Actions itself hasn't run this workflow yet; that happens on the first tag or manual run. Locally I checked:

  • The image builds from a clean git archive of main (linux/arm64, Docker 29.8).
  • The smoke test's container answers /health after about 12 seconds.
  • The documented command (DB_PATH plus a volume, MCP_EXPOSED_AGENTS=mate_help) creates the database on the volume. /agents/mate_help/mcp/health answers, tools/list without credentials returns 401, and with Basic auth it returns the tool.
  • The workflow parses as YAML. actionlint wasn't available locally.

After merging

  • Make the package public, once. The first push creates the package ghcr.io/antiv/mate as private, which is GHCR's default. Go to Package settings → Change visibility → Public. Until then, docker pull needs a login.
  • Publish an image. Either push the next tag, or run the workflow by hand from the Actions tab, which publishes a main tag.
  • Expect a long first run. The arm64 build runs under QEMU, which makes the Playwright and dependency layers slow, so the timeout is 90 minutes. Later runs reuse the cache.

.github/workflows/docker.yml builds ghcr.io/antiv/mate for linux/amd64 and
linux/arm64 on every v* tag (or by hand), tagged with the version, the minor
version and latest. It first builds the image for the runner and starts it;
nothing is pushed unless it answers /health within three minutes. Separate
from release.yml so neither blocks the other. Third-party actions are pinned
by commit, as in dependency-upgrade.yml.

README and docs/dev/deployment.md show the one-command docker run, with
DB_PATH and a volume so the SQLite database survives, and how to use the
agents from an MCP client.
@antiv
antiv merged commit d42dd09 into main Oct 14, 2026
2 checks passed
@antiv
antiv deleted the docker-image branch October 14, 2026 21:40
@antiv antiv mentioned this pull request Oct 16, 2026
45 of 47 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant