diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index a81d233..a0efac8 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -409,7 +409,7 @@ jobs: Prerelease: ${{ inputs.Prerelease }} Script: | LogGroup 'Get-GitHubUser' { - Get-GitHubUser | Format-Table -AutoSize | Out-String + Get-GitHubUser -Debug | Format-Table -AutoSize | Out-String } LogGroup 'Get-GitHubOrganization' { diff --git a/README.md b/README.md index 1033cf2..28d87ad 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ To get started with your own GitHub PowerShell based action, [create a new repos | `Token` | Log in using an Installation Access Token (IAT). | false | `${{ github.token }}` | | `ClientID` | Log in using a GitHub App, with the App's Client ID and Private Key. | false | | | `PrivateKey` | Log in using a GitHub App, with the App's Client ID and Private Key. | false | | -| `Debug` | Enable debug output. | false | `'false'` | -| `Verbose` | Enable verbose output. | false | `'false'` | +| `Debug` | Enable debug output for the whole action. | false | `'false'` | +| `Verbose` | Enable verbose output for the whole action. | false | `'false'` | | `Version` | Specifies the exact version of the GitHub module to install. | false | | | `Prerelease` | Allow prerelease versions if available. | false | `'false'` | | `ErrorView` | Configure the PowerShell `$ErrorView` variable. You can use full names ('NormalView', 'CategoryView', 'ConciseView', 'DetailedView'). It matches on partials. | false | `'NormalView'` | diff --git a/action.yml b/action.yml index 431813c..eb5fa1f 100644 --- a/action.yml +++ b/action.yml @@ -24,11 +24,11 @@ inputs: description: Log in using a GitHub App, using the App's Client ID and Private Key. required: false Debug: - description: Enable debug output. + description: Enable debug output for the whole action. required: false default: 'false' Verbose: - description: Enable verbose output. + description: Enable verbose output for the whole action. required: false default: 'false' Version: @@ -92,6 +92,8 @@ runs: run: | # ${{ inputs.Name }} $ErrorView = $env:PSMODULE_GITHUB_SCRIPT_INPUT_ErrorView + $DebugPreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue' + $VerbosePreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Verbose -eq 'true' ? 'Continue' : 'SilentlyContinue' try { ${{ github.action_path }}/scripts/init.ps1 ${{ github.action_path }}/scripts/info.ps1 diff --git a/scripts/info.ps1 b/scripts/info.ps1 index 30b2ba0..ba5874a 100644 --- a/scripts/info.ps1 +++ b/scripts/info.ps1 @@ -60,6 +60,4 @@ process { end { Write-Debug "[$scriptName] - End" - $DebugPreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue' - $VerbosePreference = $env:PSMODULE_GITHUB_SCRIPT_INPUT_Verbose -eq 'true' ? 'Continue' : 'SilentlyContinue' } diff --git a/scripts/outputs.ps1 b/scripts/outputs.ps1 index 0c4fd70..d5ca5a1 100644 --- a/scripts/outputs.ps1 +++ b/scripts/outputs.ps1 @@ -3,8 +3,6 @@ [CmdletBinding()] param() -$DebugPreference = 'SilentlyContinue' -$VerbosePreference = 'SilentlyContinue' $scriptName = $MyInvocation.MyCommand.Name Write-Debug "[$scriptName] - Start"