chore(ci): Execute 階段呼叫 codex 自我介紹並輸出至 message #3
@@ -9,15 +9,24 @@ jobs:
|
|||||||
name: 1. BUILD
|
name: 1. BUILD
|
||||||
runs-on: ubuntu
|
runs-on: ubuntu
|
||||||
outputs:
|
outputs:
|
||||||
message: ${{ steps.build.outputs.message }}
|
message: ${{ steps.execute.outputs.message }}
|
||||||
steps:
|
steps:
|
||||||
- name: Source Code checkout
|
- name: Source Code checkout
|
||||||
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
|
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: ./
|
uses: ./
|
||||||
|
with:
|
||||||
|
oauth: ${{ secrets.CODEX_OAUTH }}
|
||||||
- name: Execute
|
- name: Execute
|
||||||
id: execute
|
id: execute
|
||||||
run: echo "do something..."
|
shell: bash
|
||||||
|
run: |
|
||||||
|
MESSAGE=$(codex exec "請你進行自我介紹" 2>/dev/null)
|
||||||
|
{
|
||||||
|
echo "message<<CODEX_EOF"
|
||||||
|
echo "$MESSAGE"
|
||||||
|
echo "CODEX_EOF"
|
||||||
|
} >> "$GITHUB_OUTPUT"
|
||||||
test:
|
test:
|
||||||
name: 2. TEST
|
name: 2. TEST
|
||||||
runs-on: ubuntu
|
runs-on: ubuntu
|
||||||
|
|||||||
+3
-1
@@ -15,7 +15,9 @@ runs:
|
|||||||
- name: Setup Codex
|
- name: Setup Codex
|
||||||
env:
|
env:
|
||||||
CODEX_NON_INTERACTIVE: 1
|
CODEX_NON_INTERACTIVE: 1
|
||||||
run: curl -fsSL https://chatgpt.com/codex/install.sh | sh
|
run: |
|
||||||
|
curl -fsSL https://chatgpt.com/codex/install.sh | sh
|
||||||
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Login Codex with OAuth
|
- name: Login Codex with OAuth
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user