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