mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-09-04 02:18:23 +00:00
- Add internal/webui/ package with //go:build embedui tag for optional SPA embedding (handler.go serves static files with SPA fallback) - Add internal/version/ shared semver comparison (DRY: extracted from gateway/update_check.go and updater/updater.go) - Enhance UpdateChecker: release notes, ETag caching, filter lite-v* tags - Add web UI build stage to Dockerfile with ENABLE_EMBEDUI build arg - Simplify CI: 7 Docker variants → 4 (base, latest, full, otel) - Add SHA256 checksums job to release workflow - Add Makefile build-full target (embeds web UI in Go binary) - Default make up now embeds web UI (no separate nginx needed) - Add WITH_WEB_NGINX=1 flag for optional nginx reverse proxy - Update README + 30 translated READMEs: make up, port 18790 - Update docker-compose comments and prepare-env.sh - About dialog: show release notes with markdown rendering - Health card: amber badge for available updates BREAKING: Default Docker setup no longer requires selfservice overlay. Web dashboard served at :18790 (same port as API).
152 lines
4.4 KiB
YAML
152 lines
4.4 KiB
YAML
name: Publish Docker Images
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
env:
|
|
GHCR_IMAGE: ghcr.io/${{ github.repository }}
|
|
DOCKERHUB_IMAGE: digitop/goclaw
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# Base: backend API-only, no web UI, no runtimes
|
|
- variant: base
|
|
suffix: "-base"
|
|
enable_otel: "false"
|
|
enable_embedui: "false"
|
|
enable_python: "false"
|
|
enable_full_skills: "false"
|
|
# Latest: backend + embedded web UI + Python
|
|
- variant: latest
|
|
suffix: ""
|
|
enable_otel: "false"
|
|
enable_embedui: "true"
|
|
enable_python: "true"
|
|
enable_full_skills: "false"
|
|
# Full: all runtimes + skills pre-installed
|
|
- variant: full
|
|
suffix: "-full"
|
|
enable_otel: "false"
|
|
enable_embedui: "true"
|
|
enable_python: "true"
|
|
enable_full_skills: "true"
|
|
# OTel: latest + OpenTelemetry tracing
|
|
- variant: otel
|
|
suffix: "-otel"
|
|
enable_otel: "true"
|
|
enable_embedui: "true"
|
|
enable_python: "true"
|
|
enable_full_skills: "false"
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
${{ env.GHCR_IMAGE }}
|
|
${{ env.DOCKERHUB_IMAGE }}
|
|
tags: |
|
|
type=semver,pattern={{version}},suffix=${{ matrix.suffix }}
|
|
type=semver,pattern={{major}}.{{minor}},suffix=${{ matrix.suffix }}
|
|
type=raw,value=latest,enable=${{ matrix.suffix == '' }},suffix=
|
|
type=raw,value=${{ matrix.variant }},enable=${{ matrix.suffix != '' }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: |
|
|
ENABLE_OTEL=${{ matrix.enable_otel }}
|
|
ENABLE_EMBEDUI=${{ matrix.enable_embedui }}
|
|
ENABLE_PYTHON=${{ matrix.enable_python }}
|
|
ENABLE_FULL_SKILLS=${{ matrix.enable_full_skills }}
|
|
VERSION=${{ github.ref_name }}
|
|
cache-from: type=gha,scope=${{ matrix.variant }}
|
|
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
|
|
|
build-and-push-web:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: |
|
|
${{ env.GHCR_IMAGE }}-web
|
|
${{ env.DOCKERHUB_IMAGE }}-web
|
|
tags: |
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=raw,value=latest
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ui/web
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha,scope=web
|
|
cache-to: type=gha,mode=max,scope=web
|