Skip to content

Commit 00b83a8

Browse files
🩹 [Patch]: Cleanup logging (#15)
## Description - Cleanup logging ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 19246a1 commit 00b83a8

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/Action-Test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727

2828
- name: Action-Test
2929
uses: ./
30+
with:
31+
Debug: true
32+
Verbose: true
3033

3134
ActionTestWithScript:
3235
name: Action-Test - [WithScript]
@@ -39,11 +42,17 @@ jobs:
3942
- name: Action-Test
4043
uses: ./
4144
with:
45+
Debug: true
46+
Verbose: true
4247
Script: |
4348
LogGroup 'Get-GitHubZen' {
4449
Get-GitHubZen
4550
}
4651
52+
LogGroup 'Get-GitHubViewer' {
53+
Get-GitHubViewer -Fields name, login, id, databaseID
54+
}
55+
4756
ActionTestCommands:
4857
name: Action-Test - [Commands]
4958
runs-on: ubuntu-latest
@@ -56,6 +65,8 @@ jobs:
5665
uses: ./
5766
id: test
5867
with:
68+
Debug: true
69+
Verbose: true
5970
Prerelease: true
6071
Script: |
6172
$cat = Get-GitHubOctocat

scripts/main.ps1

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
[CmdletBinding()]
22
param()
33

4-
if ($env:GITHUB_ACTION_INPUT_Debug -eq 'true') {
5-
$DebugPreference = 'Continue'
6-
}
7-
if ($env:GITHUB_ACTION_INPUT_Verbose -eq 'true') {
8-
$VerbosePreference = 'Continue'
9-
}
4+
$DebugPreference = $env:GITHUB_ACTION_INPUT_Debug -eq 'true' ? 'Continue' : 'SilentlyContinue'
5+
$VerbosePreference = $env:GITHUB_ACTION_INPUT_Verbose -eq 'true' ? 'Continue' : 'SilentlyContinue'
106

117
'::group::Setting up GitHub PowerShell module'
128
$env:PSMODULE_GITHUB_SCRIPT = $true

0 commit comments

Comments
 (0)