From 7ca5cc74d30a9fcc6cfac49fcd6e6388f076f7ff Mon Sep 17 00:00:00 2001 From: xrgzs Date: Tue, 24 Sep 2024 11:03:36 +0800 Subject: [PATCH] fix(ci): install cf warp --- .github/workflows/make.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 6572ef7..b19b336 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -57,6 +57,29 @@ 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: Big Task shell: pwsh run: | @@ -66,6 +89,12 @@ jobs: $SkipCheck = [bool] $${{ inputs.SkipCheck }} .\msupdate.ps1 + - name: Disconnect Cloudflare WRAP + shell: pwsh + run: | + Set-Location "C:\Program Files\Cloudflare\Cloudflare WARP" + .\warp-cli.exe disconnect + - name: Get rclone Config uses: actions/checkout@v4 with: