46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
# GLOBALER CI-AI-Aufruf — das EINZIGE, was ein Ziel-Repo braucht.
|
|
# Kopie nach: <ziel-repo>/.gitea/workflows/ci-ai.yml
|
|
#
|
|
# Holt die komplette Logik zentral aus user2595/ci-ai (reusable workflows) — keine
|
|
# Skripte/Workflows ins Repo kopieren. Update der Logik passiert einmal in ci-ai.
|
|
#
|
|
# Features:
|
|
# - security : Gitleaks + Trivy, hart blockierend (push/PR)
|
|
# - review : KI-PR-Review + Summary (PR)
|
|
# - commands : Slash-Commands im Kommentar — `/gen-tests`, `/summarize`
|
|
#
|
|
# Voraussetzungen (einmalig zentral eingerichtet):
|
|
# 1. Runner instanzweit registriert (Label `eulernest`)
|
|
# 2. anonymer Clone für public Repos erlaubt
|
|
# 3. ANTHROPIC_API_KEY als Org-/Instanz-Actions-Secret (für die KI-Schritte;
|
|
# ohne ihn laufen die Scans, die KI-Teile überspringen sich sauber)
|
|
# 4. für „hart blockieren": den `security`-Check in der Branch-Protection
|
|
# als required markieren
|
|
name: CI-AI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main, master]
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
jobs:
|
|
security:
|
|
if: github.event_name != 'issue_comment'
|
|
uses: user2595/ci-ai/.gitea/workflows/reusable-security.yml@main
|
|
secrets: inherit
|
|
|
|
review:
|
|
if: github.event_name == 'pull_request'
|
|
uses: user2595/ci-ai/.gitea/workflows/reusable-ai-review.yml@main
|
|
secrets: inherit
|
|
|
|
commands:
|
|
if: >-
|
|
github.event_name == 'issue_comment' &&
|
|
(startsWith(github.event.comment.body, '/gen-tests') ||
|
|
startsWith(github.event.comment.body, '/summarize'))
|
|
uses: user2595/ci-ai/.gitea/workflows/reusable-commands.yml@main
|
|
secrets: inherit
|