fix: use actions/checkout with token auth and self-hosted runner
Some checks failed
Test / frontend-typecheck (pull_request) Successful in 1m10s
Test / frontend-tests (pull_request) Successful in 1m4s
Test / rust-fmt-check (pull_request) Successful in 2m39s
PR Review Automation / review (pull_request) Has been cancelled
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled

This commit is contained in:
Shaun Arman 2026-04-10 14:07:54 -05:00
parent ad34bda097
commit bb296a226c

View File

@ -6,7 +6,7 @@ on:
jobs:
review:
runs-on: ubuntu-latest
runs-on: self-hosted
container:
image: ubuntu:22.04
steps:
@ -18,22 +18,21 @@ jobs:
jq \
&& rm -rf /var/lib/apt/lists/*
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.TFT_GITEA_TOKEN }}
ref: ${{ github.head_ref }}
- name: Get PR diff
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
id: diff
run: |
git config --global user.name "Automated Review"
git config --global user.email "review@example.com"
git clone https://gogs.tftsr.com/sarman/tftsr-devops_investigation.git /tmp/repo
cd /tmp/repo
git fetch origin
git checkout $HEAD_REF
git diff origin/$BASE_REF..HEAD > /tmp/pr_diff.txt
git fetch origin ${{ github.base_ref }}
git diff origin/${{ github.base_ref }}..HEAD > /tmp/pr_diff.txt
echo "diff_size=$(wc -l < /tmp/pr_diff.txt)" >> $GITHUB_OUTPUT
- name: Analyze with Ollama
if: success()
if: steps.diff.outputs.diff_size > '0'
env:
OLLAMA_URL: https://ollama-ui.tftsr.com/ollama/v1
API_KEY: ${{ secrets.OLLAMA_API_KEY }}