mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
Add double quote escaping and update documentation (#7613)
This commit is contained in:
committed by
GitHub
parent
f2b1fa1399
commit
7e295782c3
@@ -190,8 +190,8 @@ Function GenerateResourcesAndImage {
|
||||
# Resource group names may contain special characters, that are not allowed in the storage account name
|
||||
$storageAccountName = $storageAccountName.Replace("-", "").Replace("_", "").Replace("(", "").Replace(")", "").ToLower()
|
||||
$storageAccountName += "001"
|
||||
|
||||
|
||||
|
||||
|
||||
# Storage Account Name can only be 24 characters long
|
||||
if ($storageAccountName.Length -gt 24){
|
||||
$storageAccountName = $storageAccountName.Substring(0, 24)
|
||||
@@ -266,10 +266,10 @@ Function GenerateResourcesAndImage {
|
||||
$AgentIp = (Invoke-RestMethod http://ipinfo.io/json).ip
|
||||
Write-Host "Restricting access to packer generated VM to agent IP Address: $AgentIp"
|
||||
}
|
||||
|
||||
|
||||
if ($builderScriptPath.Contains("pkr.hcl")) {
|
||||
if ($AgentIp) {
|
||||
$AgentIp = '[ "{0}" ]' -f $AgentIp
|
||||
$AgentIp = '[ \"{0}\" ]' -f $AgentIp
|
||||
} else {
|
||||
$AgentIp = "[]"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user