From bb66d4a773ceb889c0f6db9314502ca291336aa1 Mon Sep 17 00:00:00 2001 From: Simon Faillace Mullen <22826651+sfmullen@users.noreply.github.com> Date: Fri, 17 Jul 2026 12:28:25 -0300 Subject: [PATCH] fix(github): tolerate rate-limited version lookup in the action Composite bash steps run with -e -o pipefail, so a failed unauthenticated curl to api.github.com (shared runner IPs regularly exhaust the 60/hr limit) kills the step before the ${VERSION:-latest} fallback on the next line can apply. Authenticate the lookup with github.token and let the pipeline fail soft so the documented fallback is actually reachable. --- github/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/github/action.yml b/github/action.yml index 3d983a160995..24105c8ae1ed 100644 --- a/github/action.yml +++ b/github/action.yml @@ -44,8 +44,10 @@ runs: - name: Get opencode version id: version shell: bash + env: + GH_TOKEN: ${{ github.token }} run: | - VERSION=$(curl -sf https://api.github.com/repos/anomalyco/opencode/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4) + VERSION=$(curl -sf -H "Authorization: Bearer $GH_TOKEN" https://api.github.com/repos/anomalyco/opencode/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4 || true) echo "version=${VERSION:-latest}" >> $GITHUB_OUTPUT - name: Cache opencode