graceful fail

This commit is contained in:
2026-04-08 12:09:28 +02:00
parent e18a3e7363
commit 5f0d3f4118

View File

@@ -9,6 +9,12 @@ on:
paths: paths:
- 'paper/**' - 'paper/**'
- '.github/**' - '.github/**'
workflow_dispatch:
inputs:
skip_mirrors:
description: Skip Codex mirror generation (avoids API quota use)
type: boolean
default: false
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -24,8 +30,10 @@ jobs:
- name: Prepare appendix code snapshot - name: Prepare appendix code snapshot
run: bash paper/concat_code.sh run: bash paper/concat_code.sh
# Repo variable SKIP_CODEX_MIRRORS=true skips on push/PR; workflow_dispatch can set skip_mirrors.
- name: Generate mirrors with Codex - name: Generate mirrors with Codex
if: ${{ env.OPENAI_API_KEY != '' }} if: ${{ env.OPENAI_API_KEY != '' && vars.SKIP_CODEX_MIRRORS != 'true' && (github.event_name != 'workflow_dispatch' || github.event.inputs.skip_mirrors != 'true') }}
continue-on-error: true
uses: openai/codex-action@v1 uses: openai/codex-action@v1
with: with:
openai-api-key: ${{ env.OPENAI_API_KEY }} openai-api-key: ${{ env.OPENAI_API_KEY }}