Author SHA1 Message Date
Jeffery a66eef5490 chore(ci): 移除測試 job 的工具輸出 step
CI / Release Tag Version (pull_request) Successful in 4s
CI / Antigravity (pull_request) Failing after 17s
2026-06-29 16:41:21 +08:00
Jeffery a8b20f4cde feat(antigravity): 安裝步驟新增 OAuth 空值檢查,缺少時直接失敗 2026-06-29 16:41:21 +08:00
2 changed files with 8 additions and 2 deletions
-2
View File
@@ -62,8 +62,6 @@ jobs:
oauth: ${{ secrets.ANTIGRAVITY_OAUTH }}
# 傳入測試提示詞,要求工具回傳目前登入的 Google 帳號電子郵件,作為驗證輸出正確性的依據。
prompt: "請告訴我目前登入的Google帳號,只要電子郵件不要其他任何資訊"
- name: 工具輸出
run: echo "${{ steps.antigravity.outputs.text }}"
# 比對 Antigravity action 的輸出與預期電子郵件,不一致時讓 workflow 失敗。
- name: 檢查輸出
# 只有在 antigravity step 的輸出文字不等於預期 repository variableANTIGRAVITY_EMAIL)時才執行下方失敗指令。
+8
View File
@@ -49,6 +49,14 @@ runs:
OAUTH: ${{ inputs.oauth }}
# 執行 Antigravity CLI 安裝與 OAuth token 檔案建立流程。
run: |
# 前置檢查:確認 OAUTH 不為空;為空代表呼叫端未提供 secrets.ANTIGRAVITY_OAUTH。
if [ -z "$OAUTH" ]; then
# 將錯誤訊息輸出到標準錯誤,提示需提供 oauth input。
echo 'oauth input (secrets.ANTIGRAVITY_OAUTH) is required and must not be empty.' >&2
# 以非零退出碼結束步驟,使整個 action 失敗,避免後續寫入空白 token。
exit 1
fi
# 下載並以 bash 執行 Antigravity CLI 官方安裝腳本;
# curl -f 在 HTTP 錯誤時回傳非零,-sSL 為安靜模式並跟隨重導向,下載失敗時 pipeline 會中止。
curl -fsSL https://antigravity.google/cli/install.sh | bash