From 7c7d56a0fbee78a6a67e0f3b89542969d83ae443 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Fri, 29 May 2026 13:40:02 +0200 Subject: [PATCH] Use GH token to download Podman release in utils.ps1 This is to avoid requests failing due to GitHub's non-authenticated request rate limit. See [this PR check failure](https://github.com/podman-container-tools/podman-sandbox/actions/runs/26632208486/job/78483599334?pr=5) for an example of such a failure. Signed-off-by: Mario Loriedo --- contrib/win-installer/utils.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/win-installer/utils.ps1 b/contrib/win-installer/utils.ps1 index a4158599ba..417b2a376a 100644 --- a/contrib/win-installer/utils.ps1 +++ b/contrib/win-installer/utils.ps1 @@ -17,7 +17,11 @@ function Get-Podman-Setup-From-GitHub { Write-Host "Downloading the $arch $version Podman windows setup from GitHub..." $apiUrl = "https://api.github.com/repos/containers/podman/releases/$version" - $response = Invoke-RestMethod -Uri $apiUrl -Headers @{"User-Agent"="PowerShell"} -ErrorAction Stop + $headers = @{"User-Agent"="PowerShell"} + if ($env:GITHUB_TOKEN) { + $headers["Authorization"] = "Bearer $env:GITHUB_TOKEN" + } + $response = Invoke-RestMethod -Uri $apiUrl -Headers $headers -ErrorAction Stop $latestTag = $response.tag_name Write-Host "Looking for an asset named ""podman-installer-windows-$arch.exe""" $downloadAsset = $response.assets | Where-Object { $_.name -eq "podman-installer-windows-$arch.exe" } | Select-Object -First 1