-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9342dae
commit b3d9928
Showing
4 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# check-urls.yml | ||
# Check (most) distinct URLs in the project for reachability | ||
# | ||
|
||
name: Check URLs | ||
|
||
on: | ||
schedule: | ||
- cron: '0 4 * * 2' # Tues 4:00 AM UTC | ||
|
||
jobs: | ||
test_builds: | ||
name: Build Test | ||
if: github.repository == 'MarlinFirmware/Marlin' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Check out bugfix-2.1.x | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: bugfix-2.1.x | ||
|
||
- name: Check All URLs | ||
# Exit with an error to notify fail on URL tests | ||
run: | | ||
# Inline URL Check Script | ||
UTMP=`mktemp` | ||
grep -R -E "https?:\/\/[^ \"''\(\)\<\>]+" . | grep -v "Binary file" | sed -E 's/.*(https?:\/\/[^ \"''()<>]+).*/\1/' | sort -u -R >"$UTMP" | ||
ERR404= | ||
while IFS= read -r URL | ||
do | ||
echo -n "Checking ${URL} ... " | ||
if curl -s --head --request GET ${URL} | grep "404 Not Found" > /dev/null | ||
then | ||
ERR404=1 | ||
echo "[Error 404]" ; #break | ||
else | ||
echo "[ OK ]" | ||
fi | ||
done <"$UTMP" | ||
[[ -z $ERR404 ]] || { echo "One or more URLs could not be reached." ; exit 1 ; } | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters