fix: codex-pr-review增加秘钥校验

This commit is contained in:
shaw
2025-10-16 19:32:50 +08:00
parent c3e9082367
commit b5efb23a5e

View File

@@ -25,6 +25,23 @@ jobs:
${{ github.event.pull_request.base.ref }} \
+refs/pull/${{ github.event.pull_request.number }}/head
- name: 校验CRS密钥
if: ${{ secrets.CRS_API_KEY == '' || secrets.CRS_API_BASE_URL == '' }}
env:
CRS_API_KEY: ${{ secrets.CRS_API_KEY }}
CRS_API_BASE_URL: ${{ secrets.CRS_API_BASE_URL }}
run: |
missing=0
if [ -z "$CRS_API_KEY" ]; then
echo "::error::CRS_API_KEY 缺失,终止流程"
missing=1
fi
if [ -z "$CRS_API_BASE_URL" ]; then
echo "::error::CRS_API_BASE_URL 缺失,终止流程"
missing=1
fi
exit $missing
- name: Run Codex
id: run_codex
uses: Wei-Shaw/codex-action@crs