Skip to content

Commit

Permalink
var
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk committed Dec 20, 2023
1 parent 711a2f2 commit af6b129
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Actions/RunPipeline/RunPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ try {
if ($bcContainerHelperConfig.ContainsKey('TrustedNuGetFeeds')) {
foreach($trustedNuGetFeed in $bcContainerHelperConfig.TrustedNuGetFeeds) {
if ($trustedNuGetFeed.AuthTokenSecret) {
if ($secrets.Keys -notcontains $trustedNuGetFeed.AuthTokenSecret) {
OutputWarning -message "Secret $($trustedNuGetFeed.AuthTokenSecret) needed for trusted NuGetFeeds cannot be found"
$authTokenSecret = $trustedNuGetFeed.AuthTokenSecret
if ($secrets.Keys -notcontains $authTokenSecret) {
OutputWarning -message "Secret $authTokenSecret needed for trusted NuGetFeeds cannot be found"
}
else {
$token = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets."$($trustedNuGetFeed.AuthTokenSecret)"))
$token = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($secrets."$authTokenSecret"))
if ($trustedNuGetFeed.PSObject.Properties.Name -eq 'Token') {
$trustedNuGetFeed.Token = $token
}
Expand Down

0 comments on commit af6b129

Please sign in to comment.