docs(指令檔與 README): 補齊 action/master 逐行註解並更新 README 與 CI 觸發說明
CI / 1. BUILD (pull_request) Successful in 1s
CI / 2. TEST (pull_request) Has been skipped
CI / 3. RESULT (pull_request) Has been skipped

This commit is contained in:
Jeffery
2026-07-03 17:52:40 +08:00
parent 0d6a198233
commit e839b74754
3 changed files with 8 additions and 5 deletions
+2 -1
View File
@@ -3,7 +3,7 @@
# 本 workflow 為「CD(持續部署)」流程,於程式碼 push 到 master 分支時觸發。
# 主要工作為 checkout 完整原始碼、依指定 commit 反查其所屬的 git tag
# 並將該 tag 輸出顯示,供後續部署或版本追蹤使用。
# 更新日期:2026/07/03 11:41:20 (Asia/Taipei)
# 更新日期:2026/07/03 17:43:30 (Asia/Taipei)
# =============================================================================
# workflow 名稱,顯示於 Gitea Actions 介面
@@ -36,6 +36,7 @@ jobs:
- name: Source Code Checkout
# 使用 actions/checkout,版本由 repo/organization 變數 ACTION_CHECKOUT_VERSION 決定
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
# with:傳入 checkout action 的參數區塊
with:
# fetch-depth: 0 代表抓取完整 git 歷史(含所有 tag),
# 以利後續 git describe 能正確反查 tag(淺層 clone 會導致查不到)。
+5 -3
View File
@@ -1,6 +1,6 @@
# setup-codex
> 更新時間:2026/07/03 11:45:51
> 更新時間:2026/07/03 17:43:30
`setup-codex` 是一個 **Gitea composite action**,用於在 Gitea Actions runner 上安裝並登入 [Codex CLI](https://chatgpt.com/codex),讓後續 workflow 步驟能直接呼叫已完成 OAuth 登入的 `codex` 指令。本 repo 由 action 定義(`action.yml`)與示範用的 CI/CD workflow 組成,內容皆為 YAML 與少量 shellNode**不含可列入 README 的公開程式方法**。
@@ -10,7 +10,7 @@
| 專案名稱 | 專案描述 |
| --- | --- |
| [setup-codex](https://gitea.jsc.idv.tw/actions/setup-codex/src/branch/develop) | Gitea composite action:安裝 Codex CLI、以 base64 編碼的 OAuth 驗證檔完成登入,並顯示目前登入帳號;另附 CI(PR 發佈 Release + 執行 action)與 CDpush master 反查 commit tag)示範 workflow。 |
| [setup-codex](https://gitea.jsc.idv.tw/actions/setup-codex/src/branch/develop) | Gitea composite action:安裝 Codex CLI、以 base64 編碼的 OAuth 驗證檔完成登入,並顯示目前登入帳號;另附 CI(僅在 base 為 masterdevelop 的 PR 觸發,發佈 Release、依 is_beta 條件執行 codex 測試)與 CDpush master 反查 commit tag)示範 workflow。 |
### 參考專案
@@ -69,5 +69,7 @@ jobs:
| 檔案 | 觸發時機 | 用途 |
| --- | --- | --- |
| [action.yml](https://gitea.jsc.idv.tw/actions/setup-codex/src/branch/develop/action.yml) | 被其他 workflow 以 `uses` 引用 | 定義安裝/登入 Codex 的 composite action。 |
| [.gitea/workflows/ci.yaml](https://gitea.jsc.idv.tw/actions/setup-codex/src/branch/develop/.gitea/workflows/ci.yaml) | Pull Request `opened``synchronize` | 發佈 beta Release、執行本 action `codex exec` 產生自我介紹、顯示結果。 |
| [.gitea/workflows/ci.yaml](https://gitea.jsc.idv.tw/actions/setup-codex/src/branch/develop/.gitea/workflows/ci.yaml) | base 為 `master``develop` Pull Request`opened``synchronize` | 發佈 beta Release、輸出 `is_beta`,並在 `is_beta == 'true'`執行本 action 以 `codex exec` 產生自我介紹、顯示結果。 |
| [.gitea/workflows/master.yaml](https://gitea.jsc.idv.tw/actions/setup-codex/src/branch/develop/.gitea/workflows/master.yaml) | push 至 `master` | 反查指定 commit 所屬的 git tag 並顯示。 |
> ⚠️ 注意:`ci.yaml` 的 `build` job 目前輸出的 `is_beta` 取自 `env.IS_BETA`,但該 env 未定義,實務上 `is_beta` 會是空字串、導致 `test` job 被略過;`action.yml` 的 `outputs.message` 參照的 `steps.exchange` 步驟亦不存在。以上為既有、待人工確認事項。
+1 -1
View File
@@ -5,7 +5,7 @@
# 2) 使用外部傳入、經 base64 編碼的 OAuth 驗證檔完成 Codex 登入。
# 3) 解析登入驗證檔中的 id_token,輸出目前登入的帳號 email 以供確認。
# 使用情境:讓後續 workflow 步驟可直接呼叫已登入的 Codex CLI。
# 更新日期:2026/07/03 11:41:20
# 更新日期:2026/07/03 17:33:39
# =============================================================================
# action 名稱:顯示於 Gitea/GitHub Actions UI 上的識別名稱