mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 10:28:00 +08:00
Support ARM64 architecture (#7451)
This commit is contained in:
@@ -81,8 +81,9 @@ function Invoke-SoftwareUpdate {
|
||||
|
||||
Write-Host "`t[*] Fetching Software Updates ready to install on '$TemplateName' VM:"
|
||||
Show-StringWithFormat $newUpdates
|
||||
$listOfNewUpdates = $($($newUpdates.Split("*")).Split("Title") | Where-Object {$_ -match "Label:"}).Replace("Label: ", '')
|
||||
Write-Host "`t[*] Installing Software Updates on '$TemplateName' VM:"
|
||||
Install-SoftwareUpdate -HostName $ipAddress | Show-StringWithFormat
|
||||
Install-SoftwareUpdate -HostName $ipAddress -listOfUpdates $listOfNewUpdates | Show-StringWithFormat
|
||||
|
||||
# Check if Action: restart
|
||||
if ($newUpdates.Contains("Action: restart")) {
|
||||
@@ -145,10 +146,16 @@ $env:SSHUSER = $TemplateUsername
|
||||
$env:SSHPASS = $TemplatePassword
|
||||
|
||||
Write-Host "`n[#1] Download macOS application installer:"
|
||||
$macOSInstaller = Get-MacOSInstaller -MacOSVersion $MacOSVersion -DownloadLatestVersion $DownloadLatestVersion -BetaSearch $BetaSearch
|
||||
$shortMacOSVersion = Get-ShortMacOSVersion -MacOSVersion $MacOSVersion
|
||||
if ([string]::IsNullOrEmpty($TemplateName)) {
|
||||
$TemplateName = "clean_macos_${shortMacOSVersion}_${DiskSizeGb}gb"
|
||||
$osArch = $(arch)
|
||||
if ($osArch -eq "arm64"){
|
||||
$macOSInstaller = Get-MacOSIPSWInstaller -MacOSVersion $MacOSVersion -DownloadLatestVersion $DownloadLatestVersion -BetaSearch $BetaSearch
|
||||
$TemplateName = "clean_macos_${shortMacOSVersion}_${osArch}_${DiskSizeGb}gb"
|
||||
} else {
|
||||
$macOSInstaller = Get-MacOSInstaller -MacOSVersion $MacOSVersion -DownloadLatestVersion $DownloadLatestVersion -BetaSearch $BetaSearch
|
||||
$TemplateName = "clean_macos_${shortMacOSVersion}_${DiskSizeGb}gb"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "`n[#2] Create a VM template:"
|
||||
|
||||
Reference in New Issue
Block a user