From 23747ce7eca6944b573d5c8eda832127b5bd55f0 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Sat, 27 Jun 2026 14:28:29 +0000 Subject: [PATCH] =?UTF-8?q?feat(action):=20=E6=96=B0=E5=A2=9E=20Antigravit?= =?UTF-8?q?y=20CLI=20composite=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/action.yml b/action.yml index 646c3c6..a63303e 100644 --- a/action.yml +++ b/action.yml @@ -1,33 +1,33 @@ -name: 'Composite Action Template' -description: 'Composite Action 範本' +name: 'Antigravity CLI' +description: 'Antigravity CLI 工具' author: 'Jeffery' inputs: - text: - description: '輸入的文字' + prompt: + description: '' required: false - default: 'Hello, World!' + default: "請自我介紹" outputs: text: description: '輸出的文字' - value: ${{ steps.change.outputs.text }} + value: ${{ steps.antigravity.outputs.text }} runs: using: 'composite' + env: + OAUTH: ${{ secrets.ANTIGRAVITY_OAUTH }} + MODEL: ${{ vars.ANTIGRAVITY_MODEL }} + PROMPT: ${{ inputs.prompt }} steps: - - name: 交換 - id: change - env: - GITEA_SERVER_URL: ${{ gitea.server_url }} - GITEA_REPOSITORY: ${{ gitea.repository }} - GITEA_TOKEN: ${{ gitea.token }} - TEXT: ${{ inputs.text }} + - name: 安裝工具 + run: curl -fsSL https://antigravity.google/cli/install.sh | bash + shell: bash + - name: 執行工具 + id: antigravity run: | - echo "Gitea Server Url: $GITEA_SERVER_URL" - - echo "Gitea Repository: $GITEA_REPOSITORY" - - echo "Gitea Token: $GITEA_TOKEN" - - echo "Text: $TEXT" - - echo "text=$TEXT" >> "$GITHUB_OUTPUT" - shell: bash \ No newline at end of file + text="$(agy --model "$MODEL" --prompt "$PROMPT")" + printf '%s\n' "$text" + { + echo 'text<> "$GITHUB_OUTPUT" + shell: bash