mirror of
https://github.com/actions/runner-images.git
synced 2025-12-10 11:07:02 +00:00
Remove authentication method from script (#11616)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
param(
|
||||
[String] [Parameter (Mandatory=$true)] $TemplatePath,
|
||||
[String] [Parameter (Mandatory=$true)] $ClientId,
|
||||
[String] [Parameter (Mandatory=$true)] $ClientSecret,
|
||||
[String] [Parameter (Mandatory=$false)] $ClientSecret,
|
||||
[String] [Parameter (Mandatory=$true)] $Location,
|
||||
[String] [Parameter (Mandatory=$true)] $ImageName,
|
||||
[String] [Parameter (Mandatory=$true)] $ImageResourceGroupName,
|
||||
@@ -13,7 +13,7 @@ param(
|
||||
[String] [Parameter (Mandatory=$false)] $VirtualNetworkRG,
|
||||
[String] [Parameter (Mandatory=$false)] $VirtualNetworkSubnet,
|
||||
[String] [Parameter (Mandatory=$false)] $AllowedInboundIpAddresses = "[]",
|
||||
[hashtable] [Parameter (Mandatory=$False)] $Tags = @{}
|
||||
[hashtable] [Parameter (Mandatory=$false)] $Tags = @{}
|
||||
)
|
||||
|
||||
if (-not (Test-Path $TemplatePath))
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
param(
|
||||
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName,
|
||||
[Parameter (Mandatory=$true)] [string] $SubscriptionId,
|
||||
[Parameter (Mandatory=$true)] [string] $ClientId,
|
||||
[Parameter (Mandatory=$true)] [string] $ClientSecret,
|
||||
[Parameter (Mandatory=$true)] [string] $TenantId
|
||||
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName
|
||||
)
|
||||
|
||||
az login --service-principal --username $ClientId --password=$ClientSecret --tenant $TenantId | Out-Null
|
||||
az account set --subscription $SubscriptionId | Out-Null
|
||||
|
||||
$groupExist = az group exists --name $TempResourceGroupName
|
||||
if ($groupExist -eq "true") {
|
||||
Write-Host "Found a match, deleting temporary files"
|
||||
|
||||
Reference in New Issue
Block a user