Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/actions/templates/validateModuleDeployment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ inputs:
default: 'true'
required: false

outputs:
deploymentOutput:
description: 'The module deployment output in json format'
value: ${{ steps.deploy_step.outputs.deploymentOutput }}
# outputs:
# deploymentOutput:
# description: 'The module deployment output in json format'
# # value: ${{ fromJSON(steps.deploy_step.outputs.deploymentOutput) }}
# value: {{ steps.deploy_step.outputs.deploymentOutput }}


runs:
using: 'composite'
Expand Down Expand Up @@ -347,17 +349,17 @@ runs:
# Get deployment name
Write-Output ('{0}={1}' -f 'deploymentName', $res.deploymentName) >> $env:GITHUB_OUTPUT

# Populate further outputs
$deploymentOutputHash = @{}
# # Populate further outputs
# $deploymentOutputHash = @{}

foreach ($outputKey in $res.deploymentOutput.Keys) {
Write-Output ('{0}={1}' -f 'outputKey', $res.deploymentOutput[$outputKey].Value) >> $env:GITHUB_OUTPUT
$deploymentOutputHash.add($outputKey, $res.deploymentOutput[$outputKey].Value)
}
# foreach ($outputKey in $res.deploymentOutput.Keys) {
# Write-Output ('{0}={1}' -f 'outputKey', $res.deploymentOutput[$outputKey].Value) >> $env:GITHUB_OUTPUT
# $deploymentOutputHash.add($outputKey, $res.deploymentOutput[$outputKey].Value)
# }

$deploymentOutput = $deploymentOutputHash | ConvertTo-Json -Compress -Depth 100
Write-Verbose "Deployment output: $deploymentOutput" -Verbose
Write-Output ('{0}={1}' -f 'deploymentOutput', $deploymentOutput) >> $env:GITHUB_OUTPUT
# $deploymentOutput = $deploymentOutputHash | ConvertTo-Json -Compress -Depth 100
# Write-Verbose "Deployment output: $deploymentOutput" -Verbose
# Write-Output ('{0}={1}' -f 'deploymentOutput', $deploymentOutput) >> $env:GITHUB_OUTPUT

if ($res.ContainsKey('exception')) {
# Happens only if there is an exception
Expand Down