Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ runs:
server_info_file="${{ steps.resolve_home.outputs.codex-home }}/${{ github.run_id }}.json"
echo "server_info_file=$server_info_file" >> "$GITHUB_OUTPUT"

- name: Validate OpenAI API key input
if: ${{ inputs.prompt != '' || inputs['prompt-file'] != '' }}
shell: bash
run: |
openai_api_key="${{ inputs['openai-api-key'] }}"
if [ -z "${openai_api_key//[[:space:]]/}" ]; then
echo "openai-api-key input is empty. Set OPENAI_API_KEY secret and pass it to this action." >&2
exit 1
fi

- name: Check Responses API proxy status
id: start_proxy
if: ${{ inputs['openai-api-key'] != '' }}
Expand Down Expand Up @@ -218,7 +228,7 @@ runs:
# This step has an output named `port`.
- name: Read server info
id: read_server_info
if: ${{ inputs['openai-api-key'] != '' || inputs.prompt != '' || inputs['prompt-file'] != '' }}
if: ${{ inputs['openai-api-key'] != '' }}
shell: bash
run: node "${{ github.action_path }}/dist/main.js" read-server-info "${{ steps.derive_server_info.outputs.server_info_file }}"

Expand Down