diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 78b70a9..49c6f93 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -9,15 +9,24 @@ jobs: name: 1. BUILD runs-on: ubuntu outputs: - message: ${{ steps.build.outputs.message }} + message: ${{ steps.execute.outputs.message }} steps: - name: Source Code checkout uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }} - name: Build uses: ./ + with: + oauth: ${{ secrets.CODEX_OAUTH }} - name: Execute id: execute - run: echo "do something..." + shell: bash + run: | + MESSAGE=$(codex exec "請你進行自我介紹" 2>/dev/null) + { + echo "message<> "$GITHUB_OUTPUT" test: name: 2. TEST runs-on: ubuntu diff --git a/action.yml b/action.yml index d4c2888..db9f8cf 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,9 @@ runs: - name: Setup Codex env: 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 - name: Login Codex with OAuth env: