feat(action): 新增 Antigravity CLI composite action
This commit is contained in:
+23
-23
@@ -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
|
||||
text="$(agy --model "$MODEL" --prompt "$PROMPT")"
|
||||
printf '%s\n' "$text"
|
||||
{
|
||||
echo 'text<<ANTIGRAVITY_OUTPUT'
|
||||
printf '%s\n' "$text"
|
||||
echo 'ANTIGRAVITY_OUTPUT'
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user