From 78f5e812da3930e83323b6e873e66532190d883f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Jan 2025 21:26:52 +0100 Subject: [PATCH 1/6] Add a test for objects on output --- .github/workflows/TestWorkflow.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 9823eb8..dbe5dd8 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -92,14 +92,22 @@ jobs: Set-GitHubEnvironmentVariable -Name 'OCTOCAT' -Value $cat } - LogGroup 'Set outputs WISECAT' { + LogGroup 'Set outputs - WISECAT' { Set-GitHubOutput -Name 'WISECAT' -Value $cat } - LogGroup 'Set outputs Zen' { + LogGroup 'Set outputs - Zen' { Set-GitHubOutput -Name 'Zen' -Value $zen } + LogGroup 'Set outputs - Context' { + Set-GitHubOutput -Name 'Context' -Value (Get-GitHubContext) + } + + LogGroup 'Set outputs - Zen2' { + Set-GitHubOutput -Name 'Zen2' -Value $zen + } + - name: Run-test shell: pwsh env: From 031322e459ce6cfe784d7ba27ad5d63edcecdae0 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Jan 2025 21:28:42 +0100 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20GitConfig?= =?UTF-8?q?=20output=20to=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index dbe5dd8..d3cc6b1 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -104,6 +104,10 @@ jobs: Set-GitHubOutput -Name 'Context' -Value (Get-GitHubContext) } + LogGroup 'Set outputs - GitConfig' { + Set-GitHubOutput -Name 'GitConfig' -Value (Get-GitHubGitConfig) + } + LogGroup 'Set outputs - Zen2' { Set-GitHubOutput -Name 'Zen2' -Value $zen } From 373872c9c6525b046bc6ee98fc7865f6064ab68e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Tue, 7 Jan 2025 21:30:39 +0100 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Enhance=20output?= =?UTF-8?q?=20formatting=20in=20TestWorkflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index d3cc6b1..70c5c54 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -121,6 +121,9 @@ jobs: $result = $env:result | ConvertFrom-Json Set-GitHubStepSummary -Summary $env:WISECAT Write-GitHubNotice -Message $result.Zen -Title 'GitHub Zen' + $result.Context | Format-Table -AutoSize + $result.GitConfig | Format-Table -AutoSize + Write-Host ($result.Zen2) ActionTestWithoutToken: name: WithoutToken From ec54f5851ee9377143fe04e601e6f06de4d84bce Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 8 Jan 2025 21:37:54 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Change=20output?= =?UTF-8?q?=20formatting=20to=20use=20Format-List=20in=20TestWorkflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 70c5c54..b9aa3ed 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -121,9 +121,9 @@ jobs: $result = $env:result | ConvertFrom-Json Set-GitHubStepSummary -Summary $env:WISECAT Write-GitHubNotice -Message $result.Zen -Title 'GitHub Zen' - $result.Context | Format-Table -AutoSize - $result.GitConfig | Format-Table -AutoSize Write-Host ($result.Zen2) + $result.Context | Format-List + $result.GitConfig | Format-List ActionTestWithoutToken: name: WithoutToken From 86cc369b016f2531f030b6f145e0647f2ece44d9 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 8 Jan 2025 21:41:56 +0100 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Filter=20GitConfi?= =?UTF-8?q?g=20output=20to=20include=20only=20user.name=20and=20user.email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index b9aa3ed..927fb5a 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -105,7 +105,7 @@ jobs: } LogGroup 'Set outputs - GitConfig' { - Set-GitHubOutput -Name 'GitConfig' -Value (Get-GitHubGitConfig) + Set-GitHubOutput -Name 'GitConfig' -Value (Get-GitHubGitConfig | Where-Object { $_.Key -eq 'user.name' -or $_.Key -eq 'user.email' }) } LogGroup 'Set outputs - Zen2' { From eb67db995c4bfbebe8d1b0d327749cfa634428ea Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 8 Jan 2025 21:43:59 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20GitConfi?= =?UTF-8?q?g=20output=20filtering=20to=20use=20'Name=20-in'=20syntax=20for?= =?UTF-8?q?=20improved=20clarity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/TestWorkflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/TestWorkflow.yml b/.github/workflows/TestWorkflow.yml index 927fb5a..0103305 100644 --- a/.github/workflows/TestWorkflow.yml +++ b/.github/workflows/TestWorkflow.yml @@ -105,7 +105,7 @@ jobs: } LogGroup 'Set outputs - GitConfig' { - Set-GitHubOutput -Name 'GitConfig' -Value (Get-GitHubGitConfig | Where-Object { $_.Key -eq 'user.name' -or $_.Key -eq 'user.email' }) + Set-GitHubOutput -Name 'GitConfig' -Value (Get-GitHubGitConfig | Where-Object { $_.Name -in 'user.name','user.email' }) } LogGroup 'Set outputs - Zen2' {