From bb784297ae6053d610ec227519bbd88d6fa6a939 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 24 Jul 2026 16:35:00 +1000 Subject: [PATCH] feat: fix webui task table and add merge-to-deploy automation - webui: task rows referenced Go-style field names but store.Task JSON-marshals with lowercase tags, so every task row rendered blank - add .gitea/workflows/deploy.yml: build+push archied and archie-agent images to the registry on merge to main - docker-compose.yml: add a watchtower service so carina picks up new images and restarts the daemons without needing CI to SSH in --- .gitea/workflows/deploy.yml | 29 +++++++++++++++++++++++++++++ docker-compose.yml | 15 +++++++++++++++ internal/webui/index.html | 10 +++++----- 3 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 000000000..fd47ede44 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,29 @@ +# Builds and pushes the archied and archie-agent images on every merge +# to main. carina's watchtower container (see docker-compose.yml) picks +# up the new images and restarts the running daemons — this workflow +# never touches carina directly. +name: deploy + +on: + push: + branches: [main] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Log in to registry + run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u sam --password-stdin + + - name: Build and push archied + run: | + docker build -f Dockerfile.archied -t git.catlow.cloud/sam/archied:latest . + docker push git.catlow.cloud/sam/archied:latest + + - name: Build and push archie-agent + run: | + docker build -f Dockerfile -t git.catlow.cloud/sam/archie-agent:latest . + docker push git.catlow.cloud/sam/archie-agent:latest diff --git a/docker-compose.yml b/docker-compose.yml index e9ec20706..45882482b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,5 +53,20 @@ services: entrypoint: [""] restart: "no" + # ── deploy watcher ────────────────────────────────────────────────── + # Polls the registry for new archied/archie-agent images (pushed by + # .gitea/workflows/deploy.yml on merge to main) and restarts the + # containers that changed. Registry auth comes from the host's + # existing `docker login` config, mounted read-only. + watchtower: + image: nickfedor/watchtower + environment: + - DOCKER_CONFIG=/ + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ${HOME}/.docker/config.json:/config.json:ro + command: --interval 60 --cleanup archie-core-archied-1 archie-core-archied-winter-1 + restart: unless-stopped + volumes: nats_data: diff --git a/internal/webui/index.html b/internal/webui/index.html index 7b5235f43..d992dd41a 100644 --- a/internal/webui/index.html +++ b/internal/webui/index.html @@ -157,11 +157,11 @@ async function refresh() { .join("") || '
0
tasks
'; $("#tasks tbody").innerHTML = (tasks ?? []).map(t => ` - - ${esc(t.Owner)}/${esc(t.Repo)}#${t.IssueNumber} - ${esc(t.Title)}${esc(t.Workflow)} - ${esc(t.Status)} - ${fmt(t.Iterations)}${fmt(t.TokensUsed)} + + ${esc(t.owner)}/${esc(t.repo)}#${t.issue_number} + ${esc(t.title)}${esc(t.workflow)} + ${esc(t.status)} + ${fmt(t.iterations)}${fmt(t.tokens_used)} `).join(""); $("#workflows tbody").innerHTML = (summary.workflows ?? []).map(w => `