ci(ai): add AI PR-review workflow (ci-ai pilot) — skips cleanly without API key

This commit is contained in:
2026-06-09 15:06:51 +00:00
parent 5d343776a3
commit 5874bc8d05

View File

@@ -0,0 +1,32 @@
# Feature A — KI-PR-Review + Summary (ci-ai pilot).
# Läuft auf dem Pi-Runner (capacity 1, ~3-4 GB) -> Memory-Cap + schlankes
# python-Image, keine JS-Actions. Ohne ANTHROPIC_API_KEY überspringt das Skript
# den KI-Schritt sauber (Job bleibt grün). Aktivierung: Secret setzen + nach main.
name: AI PR Review
on:
workflow_dispatch: {}
pull_request:
types: [opened, synchronize, reopened]
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
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: anthropic
AI_MODEL: claude-3-5-haiku-latest
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITEA_TOKEN: ${{ github.token }}
GITEA_API: https://git.eulernest.eu/api/v1
run: python /opt/ci-ai/scripts/ai_review.py