chore(llm): refresh defaults to match deployed Jetson backend (#2)
Some checks failed
CD — ci-ai-bot / deploy (push) Has been cancelled
Some checks failed
CD — ci-ai-bot / deploy (push) Has been cancelled
This commit is contained in:
46
.gitea/workflows/cd.yml
Normal file
46
.gitea/workflows/cd.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
# CD — rebuild and restart ci-ai-bot on the Pi whenever bot/ or scripts/ change.
|
||||
#
|
||||
# How it works (Docker-out-of-Docker):
|
||||
# 1. Job runs in docker:cli on the Pi runner (eulernest label).
|
||||
# 2. Mounts the HOST docker socket → builds the new image directly in the host
|
||||
# Docker daemon (no registry push needed — image is already local).
|
||||
# 3. Mounts /mnt/external:ro → runs `docker compose up --force-recreate`
|
||||
# which picks up the freshly built image and recreates the container.
|
||||
#
|
||||
# Prerequisite (one-time):
|
||||
# - Runner config must list /var/run/docker.sock and /mnt/external in valid_volumes
|
||||
# (set in ansible-eulernest roles/gitea_runner/templates/config.yaml.j2).
|
||||
# - Set org variable JETSON_OLLAMA_URL in conformallab → Actions → Variables:
|
||||
# value = http://192.168.178.103:11434/v1
|
||||
name: CD — ci-ai-bot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "bot/**"
|
||||
- "scripts/**"
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: eulernest
|
||||
container:
|
||||
image: docker:27-cli
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /mnt/external:/mnt/external:ro
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build ci-ai-bot image
|
||||
# Build from repo root so bot/Dockerfile can COPY scripts/
|
||||
run: docker build -t ci-ai-bot:latest -f bot/Dockerfile .
|
||||
|
||||
- name: Recreate ci-ai-bot container
|
||||
# --force-recreate: always replace the container even if config is unchanged,
|
||||
# so the freshly built image is picked up.
|
||||
run: |
|
||||
docker compose \
|
||||
-f /mnt/external/docker-compose.yml \
|
||||
up -d --no-deps --force-recreate ci-ai-bot
|
||||
@@ -30,7 +30,8 @@ jobs:
|
||||
env:
|
||||
AI_PROVIDER: ollama
|
||||
AI_MODEL: coder
|
||||
AI_BASE_URL: http://192.168.178.103:11434/v1
|
||||
# JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables
|
||||
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }}
|
||||
GITEA_TOKEN: ${{ github.token }}
|
||||
GITEA_API: https://git.eulernest.eu/api/v1
|
||||
run: python /opt/ci-ai/scripts/ai_review.py
|
||||
|
||||
@@ -22,7 +22,8 @@ jobs:
|
||||
env:
|
||||
AI_PROVIDER: ollama
|
||||
AI_MODEL: coder
|
||||
AI_BASE_URL: http://192.168.178.103:11434/v1
|
||||
# JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables
|
||||
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }}
|
||||
GITEA_TOKEN: ${{ github.token }}
|
||||
GITEA_API: https://git.eulernest.eu/api/v1
|
||||
steps:
|
||||
|
||||
@@ -73,7 +73,8 @@ jobs:
|
||||
env:
|
||||
AI_PROVIDER: ollama
|
||||
AI_MODEL: coder
|
||||
AI_BASE_URL: http://192.168.178.103:11434/v1
|
||||
# JETSON_OLLAMA_URL: org variable in conformallab → Actions → Variables
|
||||
AI_BASE_URL: ${{ vars.JETSON_OLLAMA_URL || 'http://192.168.178.103:11434/v1' }}
|
||||
GITEA_TOKEN: ${{ github.token }}
|
||||
GITEA_API: https://git.eulernest.eu/api/v1
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user