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
while IFS= read -r URL
@@ -83,13 +86,16 @@ jobs:
83
86
fi
84
87
done <"$UTMP"
85
88
89
+ echo "[debug 3]"
86
90
if [[ -n $ISERR ]]; then
87
91
# Join bad URLs into a bulleted markdown list
88
92
printf -v BADSTR -- "- %s\n" "${BADURLS[@]}"
89
93
BODY=$(echo -e "URL Checker reports one or more URLs could not be reached:\n${BADSTR}")
90
94
echo -e "\n$BODY"
91
95
gh issue comment 26975 --repo $GITHUB_REPOSITORY --body "${BODY}"
92
96
exit 1
97
+ else
98
+ gh issue comment 26975 --body "Comment generated by action."
93
99
fi
94
100
95
101
echo -e "\nURL Check Passed."
You can’t perform that action at this time.
0 commit comments