mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Install Go to hostedtoolcache directory on Windows image (#849)
* Move installed go versions to toolcache directory
This commit is contained in:
committed by
GitHub
parent
fad0a6e41d
commit
a456ede464
@@ -11,9 +11,9 @@ function Get-GoVersion
|
||||
[String]$goVersion
|
||||
)
|
||||
Write-Host "Check if $goVersion is presented in the system"
|
||||
$DestinationPath = "$($env:SystemDrive)\"
|
||||
$goDirectory = Get-ChildItem -Path $DestinationPath -Filter "Go$goVersion*" | Select-Object -First 1
|
||||
$goPath = Join-Path $env:SystemDrive $goDirectory
|
||||
$destinationPath = "$($env:AGENT_TOOLSDIRECTORY)\go"
|
||||
$goDirectory = Get-ChildItem -Path $destinationPath -Filter "$goVersion*" | Select-Object -First 1
|
||||
$goPath = Join-Path $destinationPath "$goDirectory\x64"
|
||||
|
||||
$env:Path = "$goPath\bin;" + $env:Path
|
||||
$version = $(go version)
|
||||
|
||||
Reference in New Issue
Block a user