X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/6b42c2b8c9f9bd666120a2c19b8da509fe477f27..882d8795c6ff65c02f2657e596391748d1b6b7f5:/action.yml?ds=inline diff --git a/action.yml b/action.yml index 35705e9..8b698ae 100644 --- a/action.yml +++ b/action.yml @@ -33,12 +33,27 @@ branding: runs: using: composite steps: - - run: | + - name: black + run: | if [ "$RUNNER_OS" == "Windows" ]; then - python $GITHUB_ACTION_PATH/action/main.py + runner="python" else - python3 $GITHUB_ACTION_PATH/action/main.py + runner="python3" fi + + out=$(${runner} $GITHUB_ACTION_PATH/action/main.py) + exit_code=$? + + # Display the raw output in the step + echo "${out}" + + # Display the Markdown output in the job summary + echo "\`\`\`python" >> $GITHUB_STEP_SUMMARY + echo "${out}" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + + # Exit with the exit-code returned by Black + exit ${exit_code} env: # TODO: Remove once https://github.com/actions/runner/issues/665 is fixed. INPUT_OPTIONS: ${{ inputs.options }}