diff --git a/.gitea/workflows/pr-checker.yml b/.gitea/workflows/pr-checker.yml index 2f671c3..45f2515 100644 --- a/.gitea/workflows/pr-checker.yml +++ b/.gitea/workflows/pr-checker.yml @@ -210,9 +210,19 @@ jobs: # (variants: high, max). NOTE the provider prefix must be # "opencode-go", NOT "opencode" (Zen is a different, pay-per-call # provider and fails with 'Insufficient account funds'). - # Output is redirected (not piped through tee): if opencode fails, - # the job must fail here so the error log is never posted as a - # "review" comment. + # + # Belt and suspenders on auth: OPENCODE_API_KEY is exported for + # env-based pickup, AND an opencode.json is generated that binds + # the key to the opencode-go provider explicitly - so headless CI + # never depends on env-var mapping behavior. + printf '{ + "$schema": "https://opencode.ai/config.json", + "provider": { + "opencode-go": { + "options": { "apiKey": "%s" } + } + } + }' "$OPENCODE_API_KEY" > opencode.json # --print-logs: surface auth/provider errors in the CI log instead # of failing with an opaque exit code opencode run \