diff --git a/action.yml b/action.yml index 53317a6..fa2d17d 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,10 @@ inputs: static_token: description: 'Repository static token - get it from codecov.io. Required' required: true + colorize: + description: "Colorize the output" + required: false + default: true enterprise_url: description: 'Change the upload host (Enterprise use only)' required: false @@ -51,6 +55,13 @@ branding: runs: using: "composite" steps: + - shell: bash + run: | + if [ "${{ inputs.colored-output }}" == "true" ]; then + echo "DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION=true" >> $GITHUB_ENV + echo "TERM=xterm" >> $GITHUB_ENV + fi + - id: codecov-ats run: | commands=$(./codecov_ats.sh | tail -n 1) diff --git a/codecov_ats.sh b/codecov_ats.sh index 61b0201..72c86c9 100755 --- a/codecov_ats.sh +++ b/codecov_ats.sh @@ -3,7 +3,6 @@ [[ $INPUTS_VERBOSE == true ]] && set -x # Set colors -export TERM=xterm-color b="\033[0;36m" g="\033[0;32m" r="\033[0;31m"