Skip to content

Commit

Permalink
构建 增加IP地址更换次数限制
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed Aug 11, 2024
1 parent 9c26463 commit 45793d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@ jobs:
.\warp-cli.exe connect
# Add a loop to wait for the status to be connected
while ($true) {
for ($attemptCount = 0; $attemptCount -lt 10; $attemptCount++) {
$output = .\warp-cli.exe status
Write-Host $output
if ($output -like "*Status update: Connected*") {
break
}
Start-Sleep -Seconds 5 # Wait for 5 seconds before checking again
}
if ($attemptCount -eq 10) {
Write-Host "Failed to connect after 10 attempts."
exit 1 # Exit with an error code
}
- name: Generate version based on current date and time
id: generate_version
shell: pwsh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ jobs:
.\warp-cli.exe connect
# Add a loop to wait for the status to be connected
while ($true) {
for ($attemptCount = 0; $attemptCount -lt 10; $attemptCount++) {
$output = .\warp-cli.exe status
Write-Host $output
if ($output -like "*Status update: Connected*") {
break
}
Start-Sleep -Seconds 5 # Wait for 5 seconds before checking again
}
if ($attemptCount -eq 10) {
Write-Host "Failed to connect after 10 attempts."
exit 1 # Exit with an error code
}
- name: Generate version based on current date and time
Expand Down

0 comments on commit 45793d9

Please sign in to comment.