diff --git a/.github/workflows/build_setup_dependancies.yml b/.github/workflows/build_setup_dependancies.yml index 07a3f47d8..87964dc23 100644 --- a/.github/workflows/build_setup_dependancies.yml +++ b/.github/workflows/build_setup_dependancies.yml @@ -25,13 +25,12 @@ jobs: } $PSDependencies = @{ - 'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' } - 'PackageManagement' = @{Repository = 'PSGallery'; RequiredVersion = '1.4.8.1' } - 'PSScriptAnalyzer' = @{Repository = 'PSGallery'; RequiredVersion = '1.19.1' } - 'PlatyPS' = @{Repository = 'PSGallery'; RequiredVersion = '0.14.2' } - 'Pester' = @{Repository = 'PSGallery'; RequiredVersion = '5.3.3' } - 'AWS.Tools.Common' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' } - 'AWS.Tools.CodeArtifact' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' } + 'PowerShellGet' = @{Repository = 'PSGallery'; RequiredVersion = '3.0.12-beta' } + 'PackageManagement' = @{Repository = 'PSGallery'; RequiredVersion = '1.4.8.1' } + 'PSScriptAnalyzer' = @{Repository = 'PSGallery'; RequiredVersion = '1.19.1' } + 'PlatyPS' = @{Repository = 'PSGallery'; RequiredVersion = '0.14.2' } + 'AWS.Tools.Common' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' } + 'AWS.Tools.CodeArtifact' = @{Repository = 'PSGallery'; RequiredVersion = '4.1.122' } } foreach ($RequiredModule in $PSDependencies.Keys) { @@ -39,8 +38,4 @@ jobs: Write-Host("[status]Installing module: '$RequiredModule'; version: $($PSDependencies[$RequiredModule].RequiredVersion) from $($PSDependencies[$RequiredModule].Repository)") Install-Module -Name $RequiredModule -Repository:($($PSDependencies[$RequiredModule].Repository)) -RequiredVersion:($($PSDependencies[$RequiredModule].RequiredVersion)) -AllowPrerelease -Force } - If ([System.String]::IsNullOrEmpty((Get-Module | Where-Object { $_.Name -eq $RequiredModule }))) { - Write-Host("[status]Importing module: '$RequiredModule'") - Import-Module -Name:($RequiredModule) -Force -Global - } } \ No newline at end of file