docs(doc-funcs): 補齊 action 與 workflow 文件
CI / Release Tag Version (pull_request) Successful in 3s
CI / Antigravity (pull_request) Successful in 30s

This commit is contained in:
2026-06-27 15:26:26 +00:00
parent 55498953ec
commit 2102943611
4 changed files with 164 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
# Antigravity CLI Composite Action
更新時間:2026/06/27 23:24:37
此 repository 提供一個 Gitea/GitHub Actions composite action,用於安裝 Antigravity CLI、寫入 OAuth token、執行指定提示詞,並將 CLI 輸出寫入 action output。
## 專案列表
### 專案描述
| 專案名稱 | 專案描述 |
| --- | --- |
| [antigravity](https://gitea.jsc.idv.tw/composite-actions/antigravity/src/branch/ai-review-resolve/develop-20260627-142726) | 提供 Antigravity CLI composite action,讓 workflow 可透過 `oauth``model``prompt` 輸入執行 CLI 並取得文字輸出。 |
### 參考專案
| 專案名稱 | 參考專案列表 |
| --- | --- |
| [antigravity](https://gitea.jsc.idv.tw/composite-actions/antigravity/src/branch/ai-review-resolve/develop-20260627-142726) | 無 |
### NuGet 套件
| 專案名稱 | NuGet 套件列表 |
| --- | --- |
| [antigravity](https://gitea.jsc.idv.tw/composite-actions/antigravity/src/branch/ai-review-resolve/develop-20260627-142726) | 無 |
## 功能列表
此 repository 未包含可列入 README 的 public method、public constructor、public extension method 或 public operator。
## 使用範例
### 在 workflow 中呼叫 Antigravity CLI
以下範例示範在 workflow step 中呼叫此 composite action,傳入 OAuth token、模型名稱與提示詞,並在後續步驟讀取 `text` output。
```yaml
- name: 執行 Antigravity CLI
id: antigravity
uses: https://gitea.jsc.idv.tw/composite-actions/antigravity@v1
with:
oauth: ${{ secrets.ANTIGRAVITY_OAUTH }}
model: ${{ vars.ANTIGRAVITY_MODEL }}
prompt: "請自我介紹"
- name: 使用輸出文字
run: printf '%s\n' '${{ steps.antigravity.outputs.text }}'
```
前置條件:
- `secrets.ANTIGRAVITY_OAUTH` 必須是 Antigravity OAuth token 檔案內容的 base64 字串。
- `vars.ANTIGRAVITY_MODEL` 必須是 Antigravity CLI 可用的模型名稱。
- runner 必須可連線到 `https://antigravity.google/cli/install.sh` 以下載 CLI。
預期結果:
- action 會安裝 `agy` CLI。
- action 會將 OAuth token 寫入 `$HOME/.gemini/antigravity-cli/antigravity-oauth-token` 並設定檔案權限為 `600`
- action 會執行 `agy --print "$PROMPT" --model "$MODEL"`,並把 stdout 寫入 `steps.antigravity.outputs.text`