The Gitea runner's GITHUB_SERVER_URL is the internal http endpoint (http://172.17.0.1:3000); hard-coding https:// in the clone URL caused a TLS error. Derive the scheme from GITHUB_SERVER_URL, and use the public host for the PR-body vendor link. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,10 @@ UPSTREAM_GOMOD="https://gitea.com/gitea/runner/raw/tag"
|
|||||||
: "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}"
|
: "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}"
|
||||||
API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
API="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
||||||
|
|
||||||
host=${GITHUB_SERVER_URL#http://}; host=${host#https://}
|
# Preserve the scheme of GITHUB_SERVER_URL — on a Gitea runner this is the
|
||||||
|
# internal endpoint (e.g. http://172.17.0.1:3000), which speaks plain HTTP.
|
||||||
|
scheme="${GITHUB_SERVER_URL%%://*}"
|
||||||
|
host="${GITHUB_SERVER_URL#*://}"
|
||||||
api() { curl -fsSL -H "Authorization: token ${BUMP_TOKEN}" "$@"; }
|
api() { curl -fsSL -H "Authorization: token ${BUMP_TOKEN}" "$@"; }
|
||||||
|
|
||||||
# --- determine versions ------------------------------------------------------
|
# --- determine versions ------------------------------------------------------
|
||||||
@@ -28,7 +31,7 @@ latest=$(curl -fsSL "$UPSTREAM_RSS" \
|
|||||||
[ -n "$latest" ] || { echo "could not parse upstream version"; exit 1; }
|
[ -n "$latest" ] || { echo "could not parse upstream version"; exit 1; }
|
||||||
|
|
||||||
WORK=$(mktemp -d)
|
WORK=$(mktemp -d)
|
||||||
git clone "https://x-access-token:${BUMP_TOKEN}@${host}/${GITHUB_REPOSITORY}.git" "$WORK"
|
git clone "${scheme}://x-access-token:${BUMP_TOKEN}@${host}/${GITHUB_REPOSITORY}.git" "$WORK"
|
||||||
cd "$WORK"
|
cd "$WORK"
|
||||||
pkgdir="dev-util/${PN}"
|
pkgdir="dev-util/${PN}"
|
||||||
|
|
||||||
@@ -111,7 +114,7 @@ body=$(cat <<EOF
|
|||||||
Automated bump of \`dev-util/${PN}\` from ${current} to ${latest}.
|
Automated bump of \`dev-util/${PN}\` from ${current} to ${latest}.
|
||||||
|
|
||||||
- Upstream release: https://gitea.com/gitea/runner/releases/tag/v${latest}
|
- Upstream release: https://gitea.com/gitea/runner/releases/tag/v${latest}
|
||||||
- Vendor tarball: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/releases/tag/${vendor_tag}
|
- Vendor tarball: https://git.azy.dev/${GITHUB_REPOSITORY}/releases/tag/${vendor_tag}
|
||||||
|
|
||||||
Review checklist:
|
Review checklist:
|
||||||
- [ ] LICENSE still covers all vendored module licenses (\`go-licenses report ./...\`)
|
- [ ] LICENSE still covers all vendored module licenses (\`go-licenses report ./...\`)
|
||||||
|
|||||||
Reference in New Issue
Block a user