Skip to content

Commit e3437db

Browse files
committed
fix(action): hardcode public GitHub URLs for binary download
The sr binary is always hosted on public GitHub. Using GITHUB_API_URL and GITHUB_SERVER_URL env vars caused 401 errors on GHES runners where these point to the enterprise instance.
1 parent 6105415 commit e3437db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ runs:
108108
109109
# Resolve action ref to a release tag.
110110
# exact tag (v3.5.2) → prefix match (v3 → v3.x.x) → latest release
111-
API="${GITHUB_API_URL:-https://api.github.com}/repos/${SR_REPO}"
111+
API="https://api.github.com/repos/${SR_REPO}"
112112
TAGS=$(curl -fsSL "${API}/releases?per_page=100" | jq -r '.[].tag_name')
113113
RELEASE_TAG=$(echo "$TAGS" | grep -xF "$SR_REF" | head -1 || true)
114114
[ -z "$RELEASE_TAG" ] && RELEASE_TAG=$(echo "$TAGS" | grep "^${SR_REF}\." | head -1 || true)
@@ -120,7 +120,7 @@ runs:
120120
fi
121121
echo "Resolved ref=${SR_REF} → release=${RELEASE_TAG}"
122122
123-
URL="${GITHUB_SERVER_URL:-https://github.com}/${SR_REPO}/releases/download/${RELEASE_TAG}/${BINARY_NAME}"
123+
URL="https://github.com/${SR_REPO}/releases/download/${RELEASE_TAG}/${BINARY_NAME}"
124124
echo "Downloading ${URL}"
125125
curl -fsSL "$URL" -o "$DEST"
126126

0 commit comments

Comments
 (0)