mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
ci增加重传机制 (#410)
This commit is contained in:
parent
e9428d5757
commit
9c986d06cb
4
.github/sync.py
vendored
4
.github/sync.py
vendored
@ -97,6 +97,9 @@ def sync_to_gitee(tag: str, body: str, files: slice):
|
||||
asset_api_uri = f"{release_api_uri}/{release_id}/attach_files"
|
||||
|
||||
for file_path in files:
|
||||
success = False
|
||||
|
||||
while not success:
|
||||
files = {
|
||||
'file': open(file_path, 'rb')
|
||||
}
|
||||
@ -108,6 +111,7 @@ def sync_to_gitee(tag: str, body: str, files: slice):
|
||||
asset_info = asset_api_response.json()
|
||||
asset_name = asset_info.get('name')
|
||||
print(f"Successfully uploaded {asset_name}!")
|
||||
success = True
|
||||
else:
|
||||
print(
|
||||
f"Request failed with status code {asset_api_response.status_code}")
|
||||
|
Loading…
Reference in New Issue
Block a user