Skip to content

Commit ebc8549

Browse files
Refactor main.ps1 to streamline module source and output path definitions for improved clarity
1 parent 511d288 commit ebc8549

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

scripts/main.ps1

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,14 @@ LogGroup 'Loading inputs' {
1919
$moduleName = ($env:GITHUB_ACTION_INPUT_Name | IsNullOrEmpty) ? $env:GITHUB_REPOSITORY_NAME : $env:GITHUB_ACTION_INPUT_Name
2020
Write-Host "Module name: [$moduleName]"
2121

22-
$moduleSourceFolderPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath $env:GITHUB_ACTION_INPUT_Path/$moduleName
23-
if (-not (Test-Path -Path $moduleSourceFolderPath)) {
24-
$moduleSourceFolderPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath $env:GITHUB_ACTION_INPUT_Path
25-
}
26-
Write-Host "Source module path: [$moduleSourceFolderPath]"
22+
$moduleSourceFolderPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath $env:GITHUB_ACTION_INPUT_Path/src
2723
if (-not (Test-Path -Path $moduleSourceFolderPath)) {
2824
throw "Module path [$moduleSourceFolderPath] does not exist."
2925
}
3026

31-
$modulesOutputFolderPath = Join-Path $env:GITHUB_WORKSPACE $env:GITHUB_ACTION_INPUT_ModulesOutputPath
32-
Write-Host "Modules output path: [$modulesOutputFolderPath]"
33-
$docsOutputFolderPath = Join-Path $env:GITHUB_WORKSPACE $env:GITHUB_ACTION_INPUT_DocsOutputPath
27+
$modulesOutputFolderPath = Join-Path $env:GITHUB_ACTION_INPUT_Path -ChildPath 'outputs/module'
28+
Write-Host "Module output path: [$modulesOutputFolderPath]"
29+
$docsOutputFolderPath = Join-Path $env:GITHUB_ACTION_INPUT_Path -ChildPath 'outputs/docs'
3430
Write-Host "Docs output path: [$docsOutputFolderPath]"
3531
}
3632

0 commit comments

Comments
 (0)