Implements SPEC.md: two listeners, one writer-preferring two-mode lock, Ollama unload before image jobs, ComfyUI history polling + VRAM free, optional model warm-up, healthz/metrics endpoints, streaming-safe reverse proxies, Dockerfile and Gitea Actions CI.
63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
- run: go vet ./...
|
|
- run: go test -race ./...
|
|
- name: golangci-lint
|
|
run: |
|
|
if command -v golangci-lint >/dev/null 2>&1; then
|
|
golangci-lint run
|
|
else
|
|
echo "golangci-lint not available in runner image, skipping"
|
|
fi
|
|
|
|
docker:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Compute image tags and version
|
|
id: meta
|
|
run: |
|
|
SHORT=$(echo "${{ gitea.sha }}" | cut -c1-7)
|
|
REPO=git.rambossek.at/${{ gitea.repository }}
|
|
TAGS="$REPO:sha-$SHORT"
|
|
VERSION="sha-$SHORT"
|
|
if [ "${{ gitea.ref_type }}" = "branch" ] && [ "${{ gitea.ref_name }}" = "main" ]; then
|
|
TAGS="$TAGS,$REPO:latest"
|
|
fi
|
|
if [ "${{ gitea.ref_type }}" = "tag" ]; then
|
|
TAGS="$TAGS,$REPO:${{ gitea.ref_name }}"
|
|
VERSION="${{ gitea.ref_name }}"
|
|
fi
|
|
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
|
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: git.rambossek.at
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
build-args: |
|
|
VERSION=${{ steps.meta.outputs.version }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|