-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
entrypoint.sh
executable file
·24 lines (19 loc) · 983 Bytes
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e
if [ -n "${GITHUB_WORKSPACE}" ] ; then
cd "${GITHUB_WORKSPACE}" || exit 1
git config --global --add safe.directory "${GITHUB_WORKSPACE}" || exit 1
fi
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
redpen --version
REDPEN_CONFIG=${INPUT_CONFIG+-c ${INPUT_CONFIG}}
# shellcheck disable=SC2086
find "${INPUT_BASEDIR}" -type f -name "${INPUT_TARGETS}" -print0 \
| xargs -I {} -0 redpen ${REDPEN_CONFIG} -l 9999 -r plain {} 2>/dev/null \
| reviewdog -efm="%f:%l: Validation%t%*[a-z][%*[a-zA-Z]], %m at line:%r" \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER:-github-pr-review}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
${INPUT_REVIEWDOG_FLAGS}