AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).
feat(ci): publish versioned api and ui images to ghcr on tags
Rufusedcf4f78ed32
diff --git a/.github/workflows/release-images.yml b/.github/workflows/release-images.ymlnew file mode 100644index 00000000..d851a020--- /dev/null+++ b/.github/workflows/release-images.yml@@ -0,0 +1,87 @@+# Publish the API and UI container images to GitHub Container Registry.+#+# Every push to main refreshes the rolling `main` tag; pushing a `v*` git tag+# (e.g. `git tag v0.2.0 && git push origin v0.2.0`) publishes the versioned+# `X.Y.Z`, `X.Y` and `latest` tags. Both images are built from the same+# Dockerfiles `make docker` and a platform deploy use, so the published image is+# the same artifact a local build produces at that commit.+#+# The job is guarded to this repository: the saas fork syncs with+# `git merge upstream/main` and would otherwise run this on every push to its+# own main, and a third-party fork would try to push under its own account.+# A fork that wants its own images changes the guard and the image names.+#+# linux/amd64 only. The API image bakes torch plus two embedding-model caches+# (see docker/Dockerfile); building that under arm64 emulation is impractically+# slow. Multi-arch is a follow-up.+name: Publish images++on:+ push:+ branches: [main]+ tags: ["v*"]+ workflow_dispatch:++permissions:+ contents: read+ packages: write++concurrency:+ group: ${{ github.workflow }}-${{ github.ref }}+ # Never cancel a half-pushed release.+ cancel-in-progress: false++jobs:+ publish:+ name: Publish ${{ matrix.name }}+ if: github.repository == 'SenteLabsAI/OpenExecutive'+ runs-on: ubuntu-latest+ strategy:+ fail-fast: false+ matrix:+ include:+ - name: api+ dockerfile: docker/Dockerfile+ image: ghcr.io/sentelabsai/openexecutive-api+ - name: ui+ dockerfile: docker/Dockerfile.ui+ image: ghcr.io/sentelabsai/openexecutive-ui+ steps:+ - uses: actions/checkout@v7+ with:+ persist-credentials: false++ - uses: docker/setup-buildx-action@v3++ - uses: docker/login-action@v3+ with:+ registry: ghcr.io+ username: ${{ github.actor }}+ password: ${{ secrets.GITHUB_TOKEN }}++ # Tag set:+ # v1.2.3 tag -> 1.2.3, 1.2, latest, sha-<short>+ # main push -> main, sha-<short>+ # `latest` follows semver tags only (metadata-action's default+ # latest=auto), never a branch push. No bare `{{major}}` tag while the+ # project is pre-1.0 — a `0` tag would be misleading.+ - id: meta+ uses: docker/metadata-action@v5+ with:+ images: ${{ matrix.image }}+ tags: |+ type=semver,pattern={{version}}+ type=semver,pattern={{major}}.{{minor}}+ type=ref,event=branch+ type=sha++ - uses: docker/build-push-action@v6+ with:+ context: .+ file: ${{ matrix.dockerfile }}+ platforms: linux/amd64+ push: true+ tags: ${{ steps.meta.outputs.tags }}+ labels: ${{ steps.meta.outputs.labels }}+ cache-from: type=gha,scope=${{ matrix.name }}+ cache-to: type=gha,mode=max,scope=${{ matrix.name }}diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4b9ad00e..f559873f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -85,6 +85,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0and no persistence.### Added+- **Versioned container images on GitHub Container Registry** (#142). Every+ push to `main` publishes `ghcr.io/sentelabsai/openexecutive-api:main` and+ `…/openexecutive-ui:main`; pushing a `vX.Y.Z` git tag publishes `X.Y.Z`,+ `X.Y` and `latest`. Deployments can pull a pinned version instead of+ building from source. See `docs/deployment.md` → Images.- **Stop button in chat.** A reply can now be halted mid-stream, from the mainchat composer and the Ask OE side panel (Escape works too). Whatever theExecutive had written is kept, persisted and marked *Stopped by you*, so adiff --git a/README.md b/README.mdindex 046526ae..43a07cd0 100644--- a/README.md+++ b/README.md@@ -293,6 +293,18 @@ volume at `/data`. [docker/docker-compose.yml](docker/docker-compose.yml) is thereference topology and also what `make docker` runs locally, so the local anddeployed shapes match.+Versioned images are published to GitHub Container Registry on every release,+so a deployment can pull instead of building:++```bash+docker pull ghcr.io/sentelabsai/openexecutive-api:0.1.0+docker pull ghcr.io/sentelabsai/openexecutive-ui:0.1.0+```++Tags: `X.Y.Z` and `X.Y` for a release, `latest` for the newest release, and+`main` for the current head of `main`. See+[docs/deployment.md](docs/deployment.md#images) for how releases are cut.+> **⚠️ Single-instance only**: the scheduler claims rows via `UPDATE … RETURNING`,> which is not safe across processes. A second API replica double-fires every> scheduled action. Pin the API to one instance. The UI is stateless.diff --git a/docs/deployment.md b/docs/deployment.mdindex 40c16206..750da600 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -26,10 +26,10 @@ containers. The UI is stateless and scales freely.## Topology-| Component | Image | State |-|---|---|---|-| API | [docker/Dockerfile](../docker/Dockerfile) | One persistent volume at `/data` |-| UI | [docker/Dockerfile.ui](../docker/Dockerfile.ui) | Stateless |+| Component | Dockerfile | Published image | State |+|---|---|---|---|+| API | [docker/Dockerfile](../docker/Dockerfile) | `ghcr.io/sentelabsai/openexecutive-api` | One persistent volume at `/data` |+| UI | [docker/Dockerfile.ui](../docker/Dockerfile.ui) | `ghcr.io/sentelabsai/openexecutive-ui` | Stateless |The UI never talks to the API directly from the browser. It proxies through itsown server (`/api/backend/*`), stamping the shared secret on each upstream call,@@ -42,6 +42,39 @@ so the UI origin is the only one that *needs* to be public. See [auth.md](auth.m> before you do. Neither is set by default, and without them the API serves every> route unauthenticated with only a log line to say so.+## Images++[.github/workflows/release-images.yml](../.github/workflows/release-images.yml)+builds both images from the Dockerfiles above and pushes them to GitHub+Container Registry. The published image is the same artifact `make docker`+builds at that commit — nothing is added or configured in CI.++| Tag | Set by | Meaning |+|---|---|---|+| `X.Y.Z`, `X.Y` | pushing git tag `vX.Y.Z` | A release. Pin deployments to one of these. |+| `latest` | pushing git tag `vX.Y.Z` | The newest release. |+| `main` | every push to `main` | Current head of `main`; not a release. |+| `sha-<short>` | every push | The exact commit, for tracing an image back to source. |++**Cutting a release** is pushing a tag from a commit on `main` that CI has+already passed:++```bash+git tag v0.2.0 && git push origin v0.2.0+```++The workflow runs on the tag push and publishes the versioned tags. Nothing+bumps the version strings in `packages/core/pyproject.toml` or+`packages/ui/package.json` for you; update them in the release commit.++The images are `linux/amd64` only. The API image bakes the embedding models at+build time (see the Dockerfile), which makes an emulated arm64 build+impractically slow.++> **First publish:** GitHub creates each package as private. An org admin makes+> `openexecutive-api` and `openexecutive-ui` public once under the org's+> Packages settings; until then `docker pull` needs a token with `read:packages`.+---## Persistent state@@ -185,7 +218,8 @@ docker compose exec api sqlite3 /data/episodic_memory.db \"SELECT id, kind, status, run_at FROM scheduled_actions WHERE status='pending' LIMIT 10;"```-**Rollback** is an image-tag rollback: redeploy the previous tag. The volume is+**Rollback** is an image-tag rollback: redeploy the previous release tag+(see [Images](#images)). The volume isnot versioned with the image, so a release that migrates schema forward is notundone by rolling the image back — check what changed under `*/store.py` beforerelying on it. Additive column migrations (the common case — every column has a