mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
fix(ci): wait for Windows update feed propagation
This commit is contained in:
1 file changed
+13
-3
@@ -146,7 +146,17 @@ jobs:
|
|||||||
foreach ($relative in $feeds) {
|
foreach ($relative in $feeds) {
|
||||||
$expected = [IO.File]::ReadAllBytes((Join-Path 'gpgui/apps/update-feed-worker/public/windows' $relative))
|
$expected = [IO.File]::ReadAllBytes((Join-Path 'gpgui/apps/update-feed-worker/public/windows' $relative))
|
||||||
$downloaded = Join-Path $env:RUNNER_TEMP ('published-' + ($relative -replace '/', '-'))
|
$downloaded = Join-Path $env:RUNNER_TEMP ('published-' + ($relative -replace '/', '-'))
|
||||||
Invoke-WebRequest "https://updates.gpgui.com/windows/$relative" -OutFile $downloaded
|
$matched = $false
|
||||||
$actual = [IO.File]::ReadAllBytes($downloaded)
|
foreach ($attempt in 1..10) {
|
||||||
if ([Convert]::ToBase64String($expected) -ne [Convert]::ToBase64String($actual)) { throw "Published feed does not match: $relative" }
|
try {
|
||||||
|
Invoke-WebRequest "https://updates.gpgui.com/windows/$relative" -UserAgent 'GPConnectReleasePublisher/1.0' -OutFile $downloaded
|
||||||
|
$actual = [IO.File]::ReadAllBytes($downloaded)
|
||||||
|
$matched = [Convert]::ToBase64String($expected) -eq [Convert]::ToBase64String($actual)
|
||||||
|
} catch {
|
||||||
|
Write-Host "Waiting for published feed: $relative ($attempt/10)"
|
||||||
|
}
|
||||||
|
if ($matched) { break }
|
||||||
|
if ($attempt -lt 10) { Start-Sleep -Seconds 3 }
|
||||||
|
}
|
||||||
|
if (!$matched) { throw "Published feed does not match: $relative" }
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user