Files
Jason Staack b1ac1cce24 feat: v9.8.1 pre-built Docker images and GHCR release workflow
Setup.py now asks whether to pull pre-built images from GHCR
(recommended) or build from source. Pre-built mode skips the
15-minute compile step entirely.

- Add .github/workflows/release.yml (builds+pushes 4 images on tag)
- Add docker-compose.build.yml (source-build overlay)
- Switch docker-compose.prod.yml from build: to image: refs
- Add --build-mode CLI arg and wizard step to setup.py
- Bump version to 9.8.1 across all files
- Document TOD_VERSION env var in CONFIGURATION.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 18:33:12 -05:00

88 lines
2.6 KiB
YAML

name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ghcr.io/staack/the-other-dude
jobs:
build-and-push:
name: Build & Push Docker Images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Build and push each image sequentially to avoid OOM on the runner.
# Each multi-stage build (Go, Python/pip, Node/tsc) peaks at 1-2 GB.
- name: Build & push API
uses: docker/build-push-action@v6
with:
context: .
file: infrastructure/docker/Dockerfile.api
push: true
tags: |
${{ env.IMAGE_PREFIX }}/api:${{ steps.version.outputs.version }}
${{ env.IMAGE_PREFIX }}/api:latest
cache-from: type=gha,scope=api
cache-to: type=gha,mode=max,scope=api
- name: Build & push Poller
uses: docker/build-push-action@v6
with:
context: ./poller
file: poller/Dockerfile
push: true
tags: |
${{ env.IMAGE_PREFIX }}/poller:${{ steps.version.outputs.version }}
${{ env.IMAGE_PREFIX }}/poller:latest
cache-from: type=gha,scope=poller
cache-to: type=gha,mode=max,scope=poller
- name: Build & push Frontend
uses: docker/build-push-action@v6
with:
context: .
file: infrastructure/docker/Dockerfile.frontend
push: true
tags: |
${{ env.IMAGE_PREFIX }}/frontend:${{ steps.version.outputs.version }}
${{ env.IMAGE_PREFIX }}/frontend:latest
cache-from: type=gha,scope=frontend
cache-to: type=gha,mode=max,scope=frontend
- name: Build & push WinBox Worker
uses: docker/build-push-action@v6
with:
context: ./winbox-worker
file: winbox-worker/Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ env.IMAGE_PREFIX }}/winbox-worker:${{ steps.version.outputs.version }}
${{ env.IMAGE_PREFIX }}/winbox-worker:latest
cache-from: type=gha,scope=winbox-worker
cache-to: type=gha,mode=max,scope=winbox-worker