Skip to content

Commit

Permalink
Updated GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasherceg committed Jul 13, 2024
1 parent 9afad44 commit 817bc7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/uitest/uitest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ function Start-Sample {
}
}

# set environment variable to the application pool
# add or update environment variable to the application pool
$existingEnvVar = c:\windows\system32\inetsrv\appcmd.exe list config -section:system.applicationHost/applicationPools `
| out-string `
| select-xml -XPath "//add[@name='DefaultAppPool']/environmentVariables/add[@name='GITHUB_TOKEN']"
if ($existingEnvVar -ne $null) {
c:\windows\system32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools /-"[name='DefaultAppPool'].environmentVariables.[name='GITHUB_TOKEN']" /commit:apphost
}
c:\windows\system32\inetsrv\appcmd.exe set config -section:system.applicationHost/applicationPools /+"[name='DefaultAppPool'].environmentVariables.[name='GITHUB_TOKEN',value='$env:GITHUB_TOKEN']" /commit:apphost
}
}
Expand Down

0 comments on commit 817bc7c

Please sign in to comment.