- .gitea/workflows/cd.yml: on push to main (bot/** or scripts/**),
build ci-ai-bot:latest on the Pi runner via DooD and force-recreate
the container with docker compose (no registry push needed)
- reusable-{ai-review,commands,security}.yml: replace hardcoded
192.168.178.103:11434 with ${{ vars.JETSON_OLLAMA_URL }} (org variable
set in conformallab → fallback to old IP if variable is missing)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
# GLOBALER, wiederverwendbarer KI-PR-Review (Feature A).
|
|
# Aufruf aus einem beliebigen Repo (siehe workflows/caller.example.yml):
|
|
# jobs:
|
|
# review:
|
|
# if: github.event_name == 'pull_request'
|
|
# uses: user2595/ci-ai/.gitea/workflows/reusable-ai-review.yml@main
|
|
# secrets: inherit
|
|
#
|
|
# Voraussetzungen: globaler Runner `eulernest`, anon-Clone für public Repos.
|
|
# KI-Backend = Jetson-Ollama (self-hosted, LAN-direkt). Kein Secret nötig.
|
|
name: ci-ai · review (reusable)
|
|
|
|
on:
|
|
workflow_call: {}
|
|
|
|
jobs:
|
|
review:
|
|
runs-on: eulernest
|
|
container:
|
|
image: python:3.12-slim
|
|
options: "--memory=512m --memory-swap=768m"
|
|
steps:
|
|
- name: Tooling (git)
|
|
run: apt-get update -qq && apt-get install -y -qq --no-install-recommends git ca-certificates
|
|
|
|
- name: ci-ai-Skripte holen (anon)
|
|
run: git clone --depth 1 https://git.eulernest.eu/user2595/ci-ai.git /opt/ci-ai
|
|
|
|
- name: KI-Review (überspringt sauber ohne Key)
|
|
env:
|
|
AI_PROVIDER: ollama
|
|
AI_MODEL: coder
|
|
# 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
|