From 321fa1b05812b7a4ac59355965c8af923580da57 Mon Sep 17 00:00:00 2001 From: Cristiano Salerno <119511125+csalerno-asml@users.noreply.github.com> Date: Mon, 2 Oct 2023 15:50:13 +0200 Subject: [PATCH] Update output display to job summary --- action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 282fca43dea..0d8c172af67 100644 --- a/action.yml +++ b/action.yml @@ -36,10 +36,14 @@ runs: - name: black run: | if [ "$RUNNER_OS" == "Windows" ]; then - python $GITHUB_ACTION_PATH/action/main.py | tee -a $GITHUB_STEP_SUMMARY + out=$(python $GITHUB_ACTION_PATH/action/main.py) else - python3 $GITHUB_ACTION_PATH/action/main.py | tee -a $GITHUB_STEP_SUMMARY + out=$(python3 $GITHUB_ACTION_PATH/action/main.py) fi + + echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY + echo "${out}" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY env: # TODO: Remove once https://github.com/actions/runner/issues/665 is fixed. INPUT_OPTIONS: ${{ inputs.options }}