From e0315fd98e420c4fadbe6148e964ad1891f68b25 Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 13 Nov 2022 19:29:37 +0100 Subject: [PATCH 1/2] fromjson --- .github/actions/templates/validateModuleDeployment/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/templates/validateModuleDeployment/action.yml b/.github/actions/templates/validateModuleDeployment/action.yml index b13b11bea8..89f3aeecb6 100644 --- a/.github/actions/templates/validateModuleDeployment/action.yml +++ b/.github/actions/templates/validateModuleDeployment/action.yml @@ -71,7 +71,7 @@ inputs: outputs: deploymentOutput: description: 'The module deployment output in json format' - value: ${{ steps.deploy_step.outputs.deploymentOutput }} + value: ${{ fromJSON(steps.deploy_step.outputs.deploymentOutput) }} runs: using: 'composite' From 9c598a3ecb7c50526f96ace95bab28382abe89ce Mon Sep 17 00:00:00 2001 From: Erika Gressi Date: Sun, 13 Nov 2022 19:54:51 +0100 Subject: [PATCH 2/2] disable out --- .../validateModuleDeployment/action.yml | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/actions/templates/validateModuleDeployment/action.yml b/.github/actions/templates/validateModuleDeployment/action.yml index 89f3aeecb6..6057c0f7ac 100644 --- a/.github/actions/templates/validateModuleDeployment/action.yml +++ b/.github/actions/templates/validateModuleDeployment/action.yml @@ -68,10 +68,12 @@ inputs: default: 'true' required: false -outputs: - deploymentOutput: - description: 'The module deployment output in json format' - value: ${{ fromJSON(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' @@ -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