fix(sisyphus-agent): handle OpenCode installer failure with pinned version fallback
Replace retry loop with intelligent fallback strategy: - Try default installer first (better for version discovery) - On failure, fallback to pinned version 1.0.204 - Handle corrupted downloads with direct fallback install This addresses the sisyphus-agent workflow failure where OpenCode's installer failed with 'Failed to fetch version information' error. 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
15
.github/workflows/sisyphus-agent.yml
vendored
15
.github/workflows/sisyphus-agent.yml
vendored
@@ -86,14 +86,19 @@ jobs:
|
||||
|
||||
# Install OpenCode (skip if cached)
|
||||
if ! command -v opencode &>/dev/null; then
|
||||
for i in 1 2 3; do
|
||||
echo "Attempt $i: Installing OpenCode..."
|
||||
echo "Installing OpenCode..."
|
||||
curl -fsSL https://opencode.ai/install -o /tmp/opencode-install.sh
|
||||
|
||||
# Try default installer first, fallback to pinned version if it fails
|
||||
if file /tmp/opencode-install.sh | grep -q "shell script\|text"; then
|
||||
bash /tmp/opencode-install.sh && break
|
||||
if ! bash /tmp/opencode-install.sh 2>&1; then
|
||||
echo "Default installer failed, trying with pinned version..."
|
||||
bash /tmp/opencode-install.sh --version 1.0.204
|
||||
fi
|
||||
else
|
||||
echo "Download corrupted, trying direct install with pinned version..."
|
||||
bash <(curl -fsSL https://opencode.ai/install) --version 1.0.204
|
||||
fi
|
||||
echo "Download corrupted, retrying in 5s..."
|
||||
done
|
||||
fi
|
||||
opencode --version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user