Skip to content

Commit bc069b8

Browse files
committed
ci: 修复 version-check 受管理资产下载限流
1 parent a88627e commit bc069b8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/version-check.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ jobs:
7777
7878
while IFS= read -r path; do
7979
mkdir -p "$TMP_DIR/$(dirname "$path")"
80-
url="https://raw.githubusercontent.com/${REPO}/${TAG}/${path}"
81-
if ! curl --fail --show-error --location "$url" --output "$TMP_DIR/$path"; then
80+
url="https://api.github.com/repos/${REPO}/contents/${path}?ref=${TAG}"
81+
if ! curl --fail --show-error --location --retry 5 --retry-all-errors --retry-delay 2 \
82+
--header "Accept: application/vnd.github.raw" \
83+
--header "Authorization: Bearer ${{ github.token }}" \
84+
"$url" --output "$TMP_DIR/$path"; then
8285
echo "::error::Missing managed asset on ${TAG}: ${path}"
8386
exit 1
8487
fi

0 commit comments

Comments
 (0)