diff --git a/action.yml b/action.yml index 79b490f..d4c2888 100644 --- a/action.yml +++ b/action.yml @@ -1,11 +1,10 @@ -name: 'Gitea Composite Template' -description: 'Gitea Composite 範本' +name: 'Codex CLI' +description: '安裝 Codex CLI 工具' author: 'Jeffery' inputs: - message: - description: '輸入訊息' - required: false - default: 'Hello, World!' + oauth: + description: '透過 OAuth 登入 ChatGPT 產生驗證檔,經過 base64 編碼' + required: true outputs: message: description: '輸出訊息' @@ -13,10 +12,12 @@ outputs: runs: using: 'composite' steps: - - name: Exchange - id: exchange + - name: Setup Codex env: - MESSAGE: ${{ inputs.message }} - run: | - echo "message=$MESSAGE" >> "$GITHUB_OUTPUT" + CODEX_NON_INTERACTIVE: 1 + run: curl -fsSL https://chatgpt.com/codex/install.sh | sh shell: bash + - name: Login Codex with OAuth + env: + OAUTH: ${{ inputs.oauth }} + run: echo $OAUTH | base64 --decode > ~/.codex/auth.json \ No newline at end of file