From 3a3e88ec83f8d574faea1494915a3fff204fb9e2 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 12 Apr 2021 12:44:28 -0300 Subject: [PATCH] Added verbosity option to the GitHub Action Needs testing, related to #68 --- action.yml | 5 +++++ entrypoint.sh | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3f2bc321..10279290 100644 --- a/action.yml +++ b/action.yml @@ -19,6 +19,10 @@ inputs: required: false # TODO: fix default 'first *.sch file found' # default: '$(ls *.sch | head -n1)' + verbose: + description: 'Verbosity level [default: 0]' + required: false + default: '0' runs: using: 'docker' image: 'Dockerfile' @@ -27,6 +31,7 @@ runs: - -d ${{ inputs.dir }} - -b ${{ inputs.board }} - -e ${{ inputs.schema }} + - -v ${{ inputs.verbose }} branding: icon: 'cpu' color: 'green' diff --git a/entrypoint.sh b/entrypoint.sh index aba4dfba..0eada584 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -121,8 +121,18 @@ function args_process { -s | --skip) shift SKIP="-s $1" ;; - -v | --verbose ) - VERBOSE="-v" + -v | --verbose) shift + if [ "$1" == "0" ]; then + VERBOSE="" + elif [ "$1" == "1" ]; then + VERBOSE="-v" + elif [ "$1" == "2" ]; then + VERBOSE="-vv" + elif [ "$1" == "3" ]; then + VERBOSE="-vvv" + else + VERBOSE="-vvvv" + fi ;; -h | --help ) help