Skip to content

Commit 8211cf4

Browse files
committed
update
1 parent 5ece684 commit 8211cf4

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/terraform-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
debug-mode:
2121
description: 'Debug mode'
2222
required: false
23-
default: 'true'
23+
default: 'false'
2424
env:
2525
terraform-init-extra-args-json: '["-backend-config=subscription_id=${{ secrets.ARM_BACKEND_SUBSCRIPTION_ID }}", "-backend-config=resource_group_name=${{ secrets.ARM_BACKEND_STORAGE_RG_NAME }}", "-backend-config=storage_account_name=${{ secrets.ARM_BACKEND_STORAGE_ACCOUNT }}", "-backend-config=container_name=${{ secrets.ARM_BACKEND_CONTAINER_NAME }}"]'
2626

PowerShellModules/GitHub.psm1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
function Get-GitHubActionsInput
2+
{
3+
param(
4+
[string]$name,
5+
$default = $null
6+
)
7+
# Try underscore format (GitHub standard)
8+
$envVar = "INPUT_$($name.Replace('-', '_').ToUpper() )"
9+
$value = [System.Environment]::GetEnvironmentVariable($envVar)
10+
if (![string]::IsNullOrEmpty($value))
11+
{
12+
return $value
13+
}
14+
# Fallback: try dash format (what your env has)
15+
$envVarDash = "INPUT_$($name.ToUpper() )"
16+
$valueDash = [System.Environment]::GetEnvironmentVariable($envVarDash)
17+
if (![string]::IsNullOrEmpty($valueDash))
18+
{
19+
return $valueDash
20+
}
21+
return $default
22+
}
23+
24+
Export-ModuleMember -Function Get-GitHubActionsInput

0 commit comments

Comments
 (0)