- move cli to diferent step
Some checks failed
Ollama Review / review-code-with-llm (pull_request) Successful in 54s
continuous-integration/drone/push Build is failing

This commit is contained in:
oonyeje 2025-03-07 15:36:45 -05:00
parent 788781d077
commit 6d39e12493

View File

@ -5,7 +5,7 @@ on:
types: [opened, synchronize] # PR open시 자동 코드 리뷰 요청
jobs:
test-action:
review-code-with-llm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
@ -15,14 +15,15 @@ jobs:
id: changed-files
uses: tj-actions/changed-files@v43
- name: Review code
env:
GITEA_TOKEN: ${{ secrets.token }}
- name: Setup Gitea CLI
run: |
curl -o gitea https://dl.gitea.io/gitea-cli/1.5.0/linux-amd64/gitea
chmod +x gitea
./gitea --version
- name: Review code
env:
GITEA_TOKEN: ${{ secrets.token }}
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
review=$(curl -s https://ollama.bsidesolutions.net/api/generate -d '{"model": "${{ inputs.model }}", "prompt": "Review the following file:\n\n```\n$(cat $file)\n```", "stream": false}' | jq -r '.response')
comment="Ollama Code Review for \`$file\`:\n\n$review"