Skip to content

Commit 1cc1b52

Browse files
committed
feat: add timeout for opencode job and log printing on failure
refs: anomalyco/opencode#4672
1 parent af03571 commit 1cc1b52

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.github/workflows/opencode.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ jobs:
163163
echo "::notice title=OpenCode prompt::${message}"
164164
- name: Run opencode
165165
uses: anomalyco/opencode/github@latest
166+
timeout-minutes: 2
166167
env:
167168
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168169
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
@@ -175,3 +176,6 @@ jobs:
175176
${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
176177
&& inputs.model || 'opencode/claude-opus-4-5' }}
177178
prompt: ${{ steps.prompt.outputs.prompt }}
179+
- name: Print logs
180+
if: failure()
181+
run: cat ~/.local/share/opencode/log/* || true

0 commit comments

Comments
 (0)