Skip to content

Commit

Permalink
ci: temporarily disable Cloudflare WARP installation and disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
xrgzs committed Oct 15, 2024
1 parent fec7cea commit cd9757b
Showing 1 changed file with 33 additions and 33 deletions.
66 changes: 33 additions & 33 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ jobs:
}
ipconfig /flushdns
- name: Install Cloudflare WRAP
shell: pwsh
run: |
Write-Host "installing Cloudflare WARP..."
Invoke-WebRequest -Uri "https://1111-releases.cloudflareclient.com/win/latest" -OutFile "C:\cfwarp.msi"
Start-Process "msiexec.exe" -ArgumentList "/i C:\cfwarp.msi /qn" -Wait
Set-Location "C:\Program Files\Cloudflare\Cloudflare WARP"
.\warp-cli.exe registration new
.\warp-cli.exe connect
# Add a loop to wait for the status to be connected
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: Install Cloudflare WRAP
# shell: pwsh
# run: |
# Write-Host "installing Cloudflare WARP..."
# Invoke-WebRequest -Uri "https://1111-releases.cloudflareclient.com/win/latest" -OutFile "C:\cfwarp.msi"
# Start-Process "msiexec.exe" -ArgumentList "/i C:\cfwarp.msi /qn" -Wait
# Set-Location "C:\Program Files\Cloudflare\Cloudflare WARP"
# .\warp-cli.exe registration new
# .\warp-cli.exe connect
# # Add a loop to wait for the status to be connected
# 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: Small Task
shell: pwsh
Expand All @@ -66,17 +66,17 @@ jobs:
run: |
.\.github\workflows\check.ps1 ${{ inputs.DatabaseOnly == true && '-DatabaseOnly' || '' }}
- name: Disconnect Cloudflare WRAP
shell: pwsh
run: |
if (Test-Path "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe") {
try {
. "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe" disconnect
}
catch {
Write-Warning "Failed to disconnect Cloudflare WARP"
}
}
# - name: Disconnect Cloudflare WRAP
# shell: pwsh
# run: |
# if (Test-Path "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe") {
# try {
# . "C:\Program Files\Cloudflare\Cloudflare WARP\warp-cli.exe" disconnect
# }
# catch {
# Write-Warning "Failed to disconnect Cloudflare WARP"
# }
# }

- name: Commit and Push Changes
shell: pwsh
Expand Down

0 comments on commit cd9757b

Please sign in to comment.