From a8b20f4cde8bbaf4fc2f6973edb9adff07d646c8 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 29 Jun 2026 16:41:21 +0800 Subject: [PATCH] =?UTF-8?q?feat(antigravity):=20=E5=AE=89=E8=A3=9D?= =?UTF-8?q?=E6=AD=A5=E9=A9=9F=E6=96=B0=E5=A2=9E=20OAuth=20=E7=A9=BA?= =?UTF-8?q?=E5=80=BC=E6=AA=A2=E6=9F=A5=EF=BC=8C=E7=BC=BA=E5=B0=91=E6=99=82?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=A4=B1=E6=95=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/action.yml b/action.yml index f5c0c14..18cb39d 100644 --- a/action.yml +++ b/action.yml @@ -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