File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 6
6
name : Check URLs
7
7
8
8
on :
9
- schedule :
10
- - cron : ' 0 4 * * 2' # Tues 4:00 AM UTC
9
+ pull_request :
10
+ branches :
11
+ - bugfix-2.1.x
11
12
12
13
jobs :
13
14
check_urls :
35
36
run : |
36
37
UA="Mozilla/5.0 (Linux; Android 10; SM-G996U Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36"
37
38
UTMP=$(mktemp)
39
+ echo "[debug 1] UTMP = ${UTMP}"
38
40
echo "Gathering URLs. Please wait..."
39
41
grep -R -E "https?:\/\/[^ \"''\(\)\<\>]+" . 2>/dev/null \
40
42
| grep -v "Binary file" \
48
50
| sort -u -R \
49
51
>"$UTMP"
50
52
53
+ echo "[debug 2] link count = $(wc -l $UTMP)"
51
54
ISERR=
52
55
declare -a BADURLS
53
56
set +e
@@ -82,13 +85,16 @@ jobs:
82
85
fi
83
86
done <"$UTMP"
84
87
88
+ echo "[debug 3]"
85
89
if [[ -n $ISERR ]]; then
86
90
# Join bad URLs into a bulleted markdown list
87
91
printf -v BADSTR -- "- %s\n" "${BADURLS[@]}"
88
92
BODY=$(echo -e "URL Checker reports one or more URLs could not be reached:\n${BADSTR}")
89
93
echo -e "\n$BODY"
90
94
gh issue comment 26975 --repo $GITHUB_REPOSITORY --body "${BODY}"
91
95
exit 1
96
+ else
97
+ gh issue comment 26975 --body "Comment generated by action."
92
98
fi
93
99
94
100
echo -e "\nURL Check Passed."
You can’t perform that action at this time.
0 commit comments