X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/6b42c2b8c9f9bd666120a2c19b8da509fe477f27..722735d20ebdc66c0da0e0df7658293455694500:/action.yml 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 }}