feat(action): 新增 Antigravity CLI composite action
This commit is contained in:
+23
-23
@@ -1,33 +1,33 @@
|
|||||||
name: 'Composite Action Template'
|
name: 'Antigravity CLI'
|
||||||
description: 'Composite Action 範本'
|
description: 'Antigravity CLI 工具'
|
||||||
author: 'Jeffery'
|
author: 'Jeffery'
|
||||||
inputs:
|
inputs:
|
||||||
text:
|
prompt:
|
||||||
description: '輸入的文字'
|
description: ''
|
||||||
required: false
|
required: false
|
||||||
default: 'Hello, World!'
|
default: "請自我介紹"
|
||||||
outputs:
|
outputs:
|
||||||
text:
|
text:
|
||||||
description: '輸出的文字'
|
description: '輸出的文字'
|
||||||
value: ${{ steps.change.outputs.text }}
|
value: ${{ steps.antigravity.outputs.text }}
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
|
env:
|
||||||
|
OAUTH: ${{ secrets.ANTIGRAVITY_OAUTH }}
|
||||||
|
MODEL: ${{ vars.ANTIGRAVITY_MODEL }}
|
||||||
|
PROMPT: ${{ inputs.prompt }}
|
||||||
steps:
|
steps:
|
||||||
- name: 交換
|
- name: 安裝工具
|
||||||
id: change
|
run: curl -fsSL https://antigravity.google/cli/install.sh | bash
|
||||||
env:
|
shell: bash
|
||||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
- name: 執行工具
|
||||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
id: antigravity
|
||||||
GITEA_TOKEN: ${{ gitea.token }}
|
|
||||||
TEXT: ${{ inputs.text }}
|
|
||||||
run: |
|
run: |
|
||||||
echo "Gitea Server Url: $GITEA_SERVER_URL"
|
text="$(agy --model "$MODEL" --prompt "$PROMPT")"
|
||||||
|
printf '%s\n' "$text"
|
||||||
echo "Gitea Repository: $GITEA_REPOSITORY"
|
{
|
||||||
|
echo 'text<<ANTIGRAVITY_OUTPUT'
|
||||||
echo "Gitea Token: $GITEA_TOKEN"
|
printf '%s\n' "$text"
|
||||||
|
echo 'ANTIGRAVITY_OUTPUT'
|
||||||
echo "Text: $TEXT"
|
} >> "$GITHUB_OUTPUT"
|
||||||
|
shell: bash
|
||||||
echo "text=$TEXT" >> "$GITHUB_OUTPUT"
|
|
||||||
shell: bash
|
|
||||||
|
|||||||
Reference in New Issue
Block a user