forked from microsoft/action-armttk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
executable file
·33 lines (25 loc) · 1015 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
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -eu # Increase bash strictness
shopt -s globstar # Enable globstar
if [[ -n "${GITHUB_WORKSPACE}" ]]; then
cd "${GITHUB_WORKSPACE}/${INPUT_WORKDIR}" || exit
fi
export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"
export REVIEWDOG_VERSION=v0.14.1
echo "[action-armttk] Installing reviewdog..."
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b /tmp "${REVIEWDOG_VERSION}"
echo "[action-armttk] Checking armttk output with reviewdog..."
exit_val="0"
echo ./armttk.xml 2>&1 | # Removes ansi codes see https://github.com/reviewdog/errorformat/issues/51
/tmp/reviewdog -efm="%f:%l:%c: %m" \
-name="${INPUT_TOOL_NAME}" \
-reporter="${INPUT_REPORTER}" \
-filter-mode="${INPUT_FILTER_MODE}" \
-fail-on-error="${INPUT_FAIL_ON_ERROR}" \
-level="${INPUT_LEVEL}" \
"${INPUT_REVIEWDOG_FLAGS}" || exit_val="$?"
echo "[action-armttk] Clean up reviewdog..."
rm /tmp/reviewdog
if [[ "${exit_val}" -ne '0' ]]; then
exit 1
fi