Skip to content

Commit 49b7cef

Browse files
authored
Fix authentication header (#2)
1 parent 5dfb319 commit 49b7cef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install-nf-build-components.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ $tempDir = $env:RUNNER_TEMP
2020
[System.Net.WebClient]$webClient = New-Object System.Net.WebClient
2121
$webClient.Headers.Add("User-Agent", "request")
2222
$webClient.Headers.Add("Accept", "application/vnd.github.v3+json")
23+
$webClient.Headers.Add("ContentType", "application/json")
2324

2425
if($env:GITHUB_AUTH_TOKEN)
2526
{
2627
Write-Output "INFO: adding authentication header"
2728

28-
$auth = "basic $([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$env:GITHUB_AUTH_TOKEN"))))"
29+
# authorization header with github token
30+
$auth = "Bearer $gitHubToken"
2931

3032
$webClient.Headers.Add("Authorization", $auth)
3133
}

0 commit comments

Comments
 (0)