-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·23 lines (16 loc) · 833 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·23 lines (16 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
echo "Running check"
cd "${GITHUB_WORKSPACE}" || exit 1
git config --global --add safe.directory $GITHUB_WORKSPACE
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
if [ -n "${INPUT_PROPERTIES_FILE}" ]; then
OPT_PROPERTIES_FILE="-p ${INPUT_PROPERTIES_FILE}"
fi
wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${INPUT_CHECKSTYLE_VERSION}/checkstyle-${INPUT_CHECKSTYLE_VERSION}-all.jar > /checkstyle.jar
exec java -jar /checkstyle.jar "${INPUT_WORKDIR}" -c "${INPUT_CHECKSTYLE_CONFIG}" ${OPT_PROPERTIES_FILE} -f xml \
| reviewdog -f=checkstyle \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER:-github-pr-check}" \
-filter-mode="${INPUT_FILTER_MODE:-added}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR:-false}" \
-level="${INPUT_LEVEL}"