Files
ai-code-review/.gitea/workflows/ci.yaml
T
Jeffery 11205d5b82
CI / 1. BUILD (pull_request) Successful in 2s
CI / 2. TEST (pull_request) Failing after 12m14s
CI / 3. RESULT (pull_request) Has been skipped
chore(workflows): CI 目標非 develop 跳過 test job、CD 加印 gitea context 與 fetch-tags
2026-07-03 17:11:21 +08:00

48 lines
1.3 KiB
YAML

name: CI
on:
pull_request:
types: [opened, synchronize]
jobs:
build:
name: 1. BUILD
runs-on: ubuntu
env:
VERSION: "0.0.0-beta.${{ gitea.run_number }}"
outputs:
version: ${{ env.VERSION }}
steps:
- name: Publishing Release
uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }}
with:
name: "${{ gitea.event.repository.name }} v${{ env.VERSION }}"
tag_name: "v${{ env.VERSION }}"
target_commitish: ${{ gitea.sha }}
prerelease: ${{ gitea.base_ref == 'develop' }}
test:
name: 2. TEST
runs-on: ubuntu
needs: [build]
if: ${{ gitea.base_ref == 'develop' }}
env:
VERSION: ${{ needs.build.outputs.version }}
steps:
- name: Setup LLM CLI
uses: https://gitea.jsc.idv.tw/actions/setup-${{ vars.ACTION_SETUP_LLM_CLI }}
with:
oauth: ${{ secrets.LLM_OAUTH }}
- name: Run AI Code Review
id: ai-code-review
uses: https://gitea.jsc.idv.tw/actions/ai-code-review@v${{ env.VERSION }}
with:
token: ${{ secrets.TOKEN }}
model: ${{ vars.LLM_NAME }}
result:
name: 3. RESULT
runs-on: ubuntu
needs: [build,test]
env:
VERSION: ${{ needs.build.outputs.version }}
steps:
- name: Show Version
run: echo "$VERSION"