fix: use --use-current-runtime for cross-platform publish in CI #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Optional Codex PR review workflow. | |
| # Enable by setting repository variable CODEX_REVIEW_ENABLED=true | |
| # and adding repository secret OPENAI_API_KEY. | |
| # | |
| # This aligns with Codex for Open Source API-credit usage for | |
| # pull request review / maintainer automation. | |
| name: Codex PR Review | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: codex-review-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| codex: | |
| if: ${{ vars.CODEX_REVIEW_ENABLED == 'true' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| outputs: | |
| final_message: ${{ steps.run_codex.outputs.final-message }} | |
| steps: | |
| - name: Checkout PR merge commit | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: refs/pull/${{ github.event.pull_request.number }}/merge | |
| persist-credentials: false | |
| - name: Pre-fetch base and head refs | |
| env: | |
| PR_BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| git fetch --no-tags origin \ | |
| "$PR_BASE_REF" \ | |
| "+refs/pull/$PR_NUMBER/head" | |
| - name: Run Codex | |
| id: run_codex | |
| uses: openai/codex-action@v1 | |
| with: | |
| openai-api-key: ${{ secrets.OPENAI_API_KEY }} | |
| permission-profile: ":workspace" | |
| prompt: | | |
| Follow the review guidelines in .github/codex/prompts/review.md | |
| This is PR #${{ github.event.pull_request.number }} for ${{ github.repository }}. | |
| Review ONLY the changes introduced by the PR. Consider: | |
| git log --oneline ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} | |
| git diff --stat ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} | |
| Pull request title and body: | |
| ---- | |
| ${{ github.event.pull_request.title }} | |
| ${{ github.event.pull_request.body }} | |
| post_feedback: | |
| if: ${{ vars.CODEX_REVIEW_ENABLED == 'true' && needs.codex.outputs.final_message != '' }} | |
| needs: codex | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Report Codex feedback | |
| uses: actions/github-script@v7 | |
| env: | |
| CODEX_FINAL_MESSAGE: ${{ needs.codex.outputs.final_message }} | |
| with: | |
| github-token: ${{ github.token }} | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body: process.env.CODEX_FINAL_MESSAGE, | |
| }); |