fix(codex): 修正 runner 沙箱並改以 OAuth id_token 的 email 驗證登入帳號
codex exec 加上 -s danger-full-access 避免 runner 容器內 bubblewrap 因 無法建立 user namespace 而失敗;action 新增 email output(解析 auth.json id_token 的 email claim),CI 改用 steps.codex.outputs.email 比對 vars.CODEX_EMAIL,不再依賴模型自行回報帳號。
This commit is contained in:
@@ -29,7 +29,7 @@ jobs:
|
||||
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.text != vars.CODEX_EMAIL }}
|
||||
prompt: "請自我介紹"
|
||||
- name: 檢查登入帳號
|
||||
if: ${{ steps.codex.outputs.email != vars.CODEX_EMAIL }}
|
||||
run: exit 1
|
||||
|
||||
Reference in New Issue
Block a user