mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
28 lines
612 B
PowerShell
28 lines
612 B
PowerShell
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
function Set-GWVariable {
|
|
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Name,
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$Value
|
|
)
|
|
|
|
Write-Verbose "Setting CI variable $Name to $Value" -Verbose
|
|
|
|
if ($env:GITHUB_ENV) {
|
|
"$Name=$Value" | Out-File $env:GITHUB_ENV -Append
|
|
}
|
|
}
|
|
|
|
function Get-GWTempPath {
|
|
$temp = [System.IO.Path]::GetTempPath()
|
|
if ($env:RUNNER_TEMP) {
|
|
$temp = $env:RUNNER_TEMP
|
|
}
|
|
|
|
Write-Verbose "Get CI Temp path: $temp" -Verbose
|
|
return $temp
|
|
}
|