docs(codex): 補齊 function docstring 與指令檔註解並重建 README #4

Merged
admin merged 18 commits from develop into master 2026-06-29 07:09:22 +00:00
2 changed files with 14 additions and 14 deletions
Showing only changes of commit d05610d4e5 - Show all commits
-4
View File
@@ -28,8 +28,4 @@ jobs:
id: codex
uses: https://gitea.jsc.idv.tw/composite-actions/codex@v${{ needs.release-tag-version.outputs.version }}
with:
oauth: ${{ secrets.CODEX_OAUTH }}
prompt: "請自我介紹"
- name: 檢查登入帳號
if: ${{ steps.codex.outputs.email != vars.CODEX_EMAIL }}
run: exit 1
+14 -10
View File
@@ -6,22 +6,16 @@ inputs:
description: '傳給 Codex CLI 的提示詞'
required: false
default: "請自我介紹"
oauth:
description: 'base64 編碼的 Codex OAuth token 檔案內容'
required: true
outputs:
text:
description: '輸出的文字'
value: ${{ steps.codex.outputs.text }}
email:
description: '目前登入帳號的電子郵件(由 codex app-server account/read 取得)'
value: ${{ steps.account.outputs.email }}
runs:
using: 'composite'
steps:
- name: 安裝工具
env:
OAUTH: ${{ inputs.oauth }}
OAUTH: ${{ secrets.CODEX_OAUTH }}
run: |
npm install -g @openai/codex
@@ -49,9 +43,19 @@ runs:
echo 'CODEX_OUTPUT'
} >> "$GITHUB_OUTPUT"
shell: bash
- name: 取得登入帳號
id: account
- name: 驗證登入帳號
env:
EXPECTED_EMAIL: ${{ vars.CODEX_EMAIL }}
run: |
if [ -z "$EXPECTED_EMAIL" ]; then
echo 'CODEX_EMAIL repository variable is required.' >&2
exit 1
fi
email="$(python3 "$GITHUB_ACTION_PATH/app/codex_account.py")"
printf 'email=%s\n' "$email" >> "$GITHUB_OUTPUT"
if [ "$email" != "$EXPECTED_EMAIL" ]; then
echo '登入帳號與 CODEX_EMAIL 不符' >&2
exit 1
fi
echo '登入帳號驗證通過'
shell: bash