refactor(codex): 移除 action 內登入帳號驗證,改由呼叫端檢查
CI / Release Tag Version (pull_request) Successful in 3s
CI / Codex (pull_request) Successful in 19s

This commit is contained in:
Jeffery
2026-06-29 14:09:23 +08:00
parent 4077596fcc
commit 03d082d0f3
-8
View File
@@ -36,17 +36,12 @@ runs:
id: codex id: codex
env: env:
MODEL: ${{ vars.CODEX_MODEL }} MODEL: ${{ vars.CODEX_MODEL }}
EXPECTED_EMAIL: ${{ vars.CODEX_EMAIL }}
PROMPT: ${{ inputs.prompt }} PROMPT: ${{ inputs.prompt }}
run: | run: |
if [ -z "$MODEL" ]; then if [ -z "$MODEL" ]; then
echo 'CODEX_MODEL repository variable is required.' >&2 echo 'CODEX_MODEL repository variable is required.' >&2
exit 1 exit 1
fi fi
if [ -z "$EXPECTED_EMAIL" ]; then
echo 'CODEX_EMAIL repository variable is required.' >&2
exit 1
fi
if [ -z "$PROMPT" ]; then if [ -z "$PROMPT" ]; then
email="$(python3 "$GITHUB_ACTION_PATH/app/codex_account.py")" email="$(python3 "$GITHUB_ACTION_PATH/app/codex_account.py")"
echo "text=$email" >> "$GITHUB_OUTPUT" echo "text=$email" >> "$GITHUB_OUTPUT"
@@ -60,6 +55,3 @@ runs:
echo 'CODEX_OUTPUT' echo 'CODEX_OUTPUT'
} >> "$GITHUB_OUTPUT" } >> "$GITHUB_OUTPUT"
shell: bash shell: bash
- name: 檢查輸出
if: ${{ steps.codex.outputs.text != vars.ANTIGRAVITY_EMAIL }}
run: exit 1