Files
MoviePilot/.github/workflows/moviepilot-codex-run.yml
DDSRem 2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00

86 lines
2.7 KiB
YAML

# 为 jxxghp/MoviePilot 执行可信任务;受保护的控制代码引用跟随 main 分支。
name: MoviePilot Codex trusted run
on:
workflow_dispatch:
inputs:
prompt_name:
required: true
type: string
source_event:
required: true
type: string
target_kind:
required: true
type: string
target_number:
required: false
type: string
target_ref:
required: false
type: string
target_sha:
required: false
type: string
target_run_id:
required: false
type: string
permissions:
contents: read
issues: read
pull-requests: read
jobs:
shadow:
if: ${{ vars.CODEX_ENABLED == 'true' && vars.CODEX_PUBLISH_COMMENTS != 'true' }}
permissions:
contents: read
issues: read
pull-requests: read
uses: jxxghp/MoviePilot-Maintenance/.github/workflows/codex-event.yml@main
with:
control_repository: jxxghp/MoviePilot-Maintenance
control_ref: main
prompt_name: ${{ inputs.prompt_name }}
codex_model: ${{ vars.CODEX_MODEL }}
codex_effort: ${{ vars.CODEX_EFFORT || 'max' }}
openai_base_url: ${{ vars.OPENAI_BASE_URL }}
publish_comments: false
autofix_enabled: false
telegram_enabled: false
source_event: ${{ inputs.source_event }}
target_kind: ${{ inputs.target_kind }}
target_number: ${{ inputs.target_number }}
target_ref: ${{ inputs.target_ref }}
target_sha: ${{ inputs.target_sha }}
target_run_id: ${{ inputs.target_run_id }}
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
propose:
if: ${{ vars.CODEX_ENABLED == 'true' && vars.CODEX_PUBLISH_COMMENTS == 'true' }}
permissions:
contents: read
issues: write
pull-requests: read
uses: jxxghp/MoviePilot-Maintenance/.github/workflows/codex-propose.yml@main
with:
control_repository: jxxghp/MoviePilot-Maintenance
control_ref: main
prompt_name: ${{ inputs.prompt_name }}
codex_model: ${{ vars.CODEX_MODEL }}
codex_effort: ${{ vars.CODEX_EFFORT || 'max' }}
openai_base_url: ${{ vars.OPENAI_BASE_URL }}
telegram_enabled: ${{ vars.TELEGRAM_ENABLED == 'true' && vars.TELEGRAM_CHAT_ID != '' }}
telegram_chat_id: ${{ vars.TELEGRAM_ENABLED == 'true' && vars.TELEGRAM_CHAT_ID || '' }}
source_event: ${{ inputs.source_event }}
target_kind: ${{ inputs.target_kind }}
target_number: ${{ inputs.target_number }}
target_ref: ${{ inputs.target_ref }}
target_sha: ${{ inputs.target_sha }}
target_run_id: ${{ inputs.target_run_id }}
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}