Skip to content

Commit d048a52

Browse files
test
1 parent 295b807 commit d048a52

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ inputs:
4040
default: ${{ github.workspace }}
4141

4242
outputs:
43-
return:
43+
result:
4444
description: The output of the script.
45-
value: ${{ steps.RunGitGubScript.outputs.return }}
45+
value: ${{ steps.RunGitGubScript.outputs.result }}
4646

4747
runs:
4848
using: composite
@@ -63,3 +63,4 @@ runs:
6363
# GitHub-Script
6464
. "${{ github.action_path }}\scripts\main.ps1"
6565
${{ inputs.Script }}
66+
. "${{ github.action_path }}\scripts\outputs.ps1"

scripts/main.ps1

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ if ($env:GITHUB_ACTION_INPUT_Verbose -eq 'true') {
1010

1111
'::group::Setting up GitHub PowerShell module'
1212
$env:PSMODULE_GITHUB_SCRIPT = $true
13-
"----------------------------------------------------------"
14-
Get-ChildItem env:
15-
'----------------------------------------------------------'
16-
Get-Content $env:GITHUB_ENV
17-
'----------------------------------------------------------'
1813

1914
$Name = 'GitHub'
2015
$Version = [string]::IsNullOrEmpty($env:GITHUB_ACTION_INPUT_Version) ? $null : $env:GITHUB_ACTION_INPUT_Version
@@ -53,10 +48,10 @@ if (-not $alreadyImported) {
5348
Import-Module -Name $Name
5449
}
5550

56-
Write-Host 'Installed modules:'
51+
Write-Output 'Installed modules:'
5752
Get-InstalledPSResource | Select-Object Name, Version, Prerelease | Format-Table -AutoSize
5853

59-
Write-Host 'GitHub module configuration:'
54+
Write-Output 'GitHub module configuration:'
6055
Get-GitHubConfig | Select-Object Name, ID, RunEnv | Format-Table -AutoSize
6156

6257
'::endgroup::'

scripts/outputs.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$outputs = Get-GitHubOutput
2+
$env:PSMODULE_GITHUB_SCRIPT = $false
3+
Set-GitHubOutput -Name 'result' -Value $outputs.result

0 commit comments

Comments
 (0)