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