Skip to content

Commit

Permalink
Use reviewdog exit code for the action (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lewis authored Jun 14, 2022
1 parent c5a0c55 commit 8c429df
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8c429df

Please sign in to comment.