From 8c429dfe4fc47b1ce1fa99a64e94693880d5dc30 Mon Sep 17 00:00:00 2001 From: Ian Lewis Date: Tue, 14 Jun 2022 18:30:09 +0900 Subject: [PATCH] Use reviewdog exit code for the action (#23) --- entrypoint.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 8c3adaa..dc899f6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,14 +6,18 @@ git config --global --add safe.directory $GITHUB_WORKSPACE export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}" +echo '::group:: Running yamllint with reviewdog 🐶 ...' yamllint --version +yamllint --format "parsable" ${INPUT_YAMLLINT_FLAGS:-'.'} | + reviewdog \ + -efm="%f:%l:%c: %m" \ + -name "yamllint" \ + -reporter="${INPUT_REPORTER:-github-pr-check}" \ + -level="${INPUT_LEVEL}" \ + -filter-mode="${INPUT_FILTER_MODE}" \ + -fail-on-error="${INPUT_FAIL_ON_ERROR}" \ + ${INPUT_REVIEWDOG_FLAGS} +EXIT_CODE=$? +echo '::endgroup::' -yamllint --format "parsable" ${INPUT_YAMLLINT_FLAGS:-'.'} \ - | reviewdog \ - -efm="%f:%l:%c: %m" \ - -name "yamllint" \ - -reporter="${INPUT_REPORTER:-github-pr-check}" \ - -level="${INPUT_LEVEL}" \ - -filter-mode="${INPUT_FILTER_MODE}" \ - -fail-on-error="${INPUT_FAIL_ON_ERROR}" \ - ${INPUT_REVIEWDOG_FLAGS} +exit $EXIT_CODE