mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Update CI actions according to demands (#7395)
This commit is contained in:
@@ -41,6 +41,8 @@ param(
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$VIPassword,
|
||||
|
||||
[string]$JobStatus,
|
||||
|
||||
[int32]$CpuCount,
|
||||
|
||||
[int32]$CoresPerSocketCount,
|
||||
@@ -62,7 +64,7 @@ try {
|
||||
}
|
||||
|
||||
$vm = Get-VM $VMName
|
||||
if ($env:AGENT_JOBSTATUS -eq 'Failed') {
|
||||
if (($env:AGENT_JOBSTATUS -and $env:AGENT_JOBSTATUS -eq 'Failed') -or ($JobStatus -and $JobStatus -eq 'failure')) {
|
||||
try {
|
||||
if($vm.PowerState -ne "PoweredOff") {
|
||||
Stop-VM -VM $vm -Confirm:$false -ErrorAction Stop | Out-Null
|
||||
|
||||
Reference in New Issue
Block a user