mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 10:28:10 +08:00
[macOS] Improve select-datastore script (#2771)
* select last one * Fix comment
This commit is contained in:
@@ -78,8 +78,8 @@ function Select-DataStore {
|
||||
|
||||
# Wait for 60 seconds to check if any other tags are assigned to the same datastore
|
||||
Start-Sleep -Seconds 60
|
||||
# Take only first 2 tags, all the others will go to the next round
|
||||
$tagAssignments = (Get-TagAssignment -Entity $buildDatastore).Tag.Name | Select-Object -First 2
|
||||
# Take the last tag (Last in, first out), all the others will go to the next round
|
||||
$tagAssignments = (Get-TagAssignment -Entity $buildDatastore).Tag.Name | Select-Object -Last 1
|
||||
$isAllow = $tagAssignments -contains $VMName
|
||||
|
||||
if ($isAllow)
|
||||
|
||||
Reference in New Issue
Block a user