From 043bb4d2915f09ceeee1e5d5df81513059d3ec37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Titsworth-Morin?= Date: Wed, 17 Jun 2026 15:27:40 +0000 Subject: [PATCH] fix: skip output evaluation when capture-output is disabled The outputs block in composite actions always evaluates its expressions, even when the step output is empty. GHA's template engine hits a memory limit processing the step context from large deployments. Fix by referencing a forwarding step that is skipped entirely when capture-output is false, preventing the expression evaluation. Co-Authored-By: Claude Opus 4.6 --- action.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 9aef8ae..8dc9373 100644 --- a/action.yaml +++ b/action.yaml @@ -62,7 +62,7 @@ inputs: outputs: stdout: description: "The stdout of the command. Only available when capture-output is 'true'." - value: ${{ steps.command.outputs.stdout }} + value: ${{ steps.forward-output.outputs.stdout }} runs: using: "composite" @@ -207,3 +207,14 @@ runs: CONFIG_ENV_VARS_INIT_RANDOM: ${{ inputs['config-vars-init-random'] }} CAPTURE_OUTPUT: ${{ inputs['capture-output'] }} + - name: Forward output + id: forward-output + if: ${{ inputs['capture-output'] == 'true' }} + shell: bash + run: | + echo "stdout<> "$GITHUB_OUTPUT" + echo "$STDOUT" >> "$GITHUB_OUTPUT" + echo "DEFANG_EOF" >> "$GITHUB_OUTPUT" + env: + STDOUT: ${{ steps.command.outputs.stdout }} +