fix(action): 改由 inputs 傳遞 OAuth 與模型設定
This commit is contained in:
@@ -25,6 +25,8 @@ jobs:
|
|||||||
id: antigravity
|
id: antigravity
|
||||||
uses: https://gitea.jsc.idv.tw/composite-actions/antigravity@v${{ needs.release-tag-version.outputs.version }}
|
uses: https://gitea.jsc.idv.tw/composite-actions/antigravity@v${{ needs.release-tag-version.outputs.version }}
|
||||||
with:
|
with:
|
||||||
|
oauth: ${{ secrets.ANTIGRAVITY_OAUTH }}
|
||||||
|
model: ${{ vars.ANTIGRAVITY_MODEL }}
|
||||||
prompt: "請告訴我目前登入的Google帳號,只要電子郵件不要其他任何資訊"
|
prompt: "請告訴我目前登入的Google帳號,只要電子郵件不要其他任何資訊"
|
||||||
- name: 檢查輸出
|
- name: 檢查輸出
|
||||||
if: ${{ steps.antigravity.outputs.text != vars.ANTIGRAVITY_EMAIL }}
|
if: ${{ steps.antigravity.outputs.text != vars.ANTIGRAVITY_EMAIL }}
|
||||||
|
|||||||
+8
-2
@@ -6,6 +6,12 @@ inputs:
|
|||||||
description: ''
|
description: ''
|
||||||
required: false
|
required: false
|
||||||
default: "請自我介紹"
|
default: "請自我介紹"
|
||||||
|
model:
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
|
oauth:
|
||||||
|
description: ''
|
||||||
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
text:
|
text:
|
||||||
description: '輸出的文字'
|
description: '輸出的文字'
|
||||||
@@ -15,7 +21,7 @@ runs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 安裝工具
|
- name: 安裝工具
|
||||||
env:
|
env:
|
||||||
OAUTH: ${{ secrets.ANTIGRAVITY_OAUTH }}
|
OAUTH: ${{ inputs.oauth }}
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://antigravity.google/cli/install.sh | bash
|
curl -fsSL https://antigravity.google/cli/install.sh | bash
|
||||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||||
@@ -33,7 +39,7 @@ runs:
|
|||||||
- name: 執行工具
|
- name: 執行工具
|
||||||
id: antigravity
|
id: antigravity
|
||||||
env:
|
env:
|
||||||
MODEL: ${{ vars.ANTIGRAVITY_MODEL }}
|
MODEL: ${{ inputs.model }}
|
||||||
PROMPT: ${{ inputs.prompt }}
|
PROMPT: ${{ inputs.prompt }}
|
||||||
run: |
|
run: |
|
||||||
text="$(agy --print "$PROMPT" --model "$MODEL")"
|
text="$(agy --print "$PROMPT" --model "$MODEL")"
|
||||||
|
|||||||
Reference in New Issue
Block a user