added workflow for ai-review

This commit is contained in:
2026-06-29 15:11:59 +03:00
parent 5a157c7eff
commit 3e9475abb5
+60
View File
@@ -0,0 +1,60 @@
name: 🤖 AI Review
on:
# Ручной запуск из вкладки Actions
workflow_dispatch:
inputs:
review-command:
type: choice
default: "run"
options:
- run
- run-inline
- run-context
- run-summary
- run-inline-reply
- run-summary-reply
description: "AI Review command"
pull-request-number:
type: string
required: true
description: "Pull Request number"
# Автоматический запуск при открытии/обновлении PR
pull_request:
types: [opened, synchronize, reopened]
jobs:
ai-review:
name: Run AI Review
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run AI Review
run: |
docker run --rm \
-v $(pwd):/app \
-e LLM__PROVIDER="OPENROUTER" \
-e LLM__META__MODEL="nvidia/nemotron-3-ultra-550b-a55b:free" \
-e LLM__META__MAX_TOKENS="15000" \
-e LLM__META__TEMPERATURE="0.3" \
-e LLM__HTTP_CLIENT__API_URL="https://openrouter.ai/api/v1" \
-e LLM__HTTP_CLIENT__API_TOKEN="${{ secrets.OPENROUTER_API_TOKEN }}" \
-e VCS__PROVIDER="GITEA" \
-e VCS__PIPELINE__OWNER="${{ gitea.repository_owner }}" \
-e VCS__PIPELINE__REPO="${{ gitea.event.repository.name }}" \
-e VCS__PIPELINE__PULL_NUMBER="${{ inputs.pull-request-number || gitea.event.pull_request.number }}" \
-e VCS__HTTP_CLIENT__API_URL="https://gitea.aklivtsov.tech/api/v1" \
-e VCS__HTTP_CLIENT__API_TOKEN="${{ secrets.ACCESS_TOKEN_GITEA }}" \
nikitafilonov/ai-review:latest \
ai-review ${{ inputs.review-command || 'run-inline' }}