From 396d2a7b3b51046c2bccc911c3d6665adc0c073a Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Wed, 21 Dec 2022 19:03:56 +0100 Subject: [PATCH] CI: check URLs --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78432554..75aa3f5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,13 @@ jobs: run: | find src/ extras/ -name '*.[ch]pp' | xargs clang-format -i --verbose --style=file git diff --exit-code + - name: Check URLs + run: | + grep -hREo "(http|https)://[a-zA-Z0-9./?=_%:-]*" src/ | sort -u | while read -r URL + do + STATUS=$(curl -s -o /dev/null -I -w "%{http_code}" "$URL") + [ "$STATUS" -ge 400 ] && echo "::warning title=HTTP $STATUS::$URL returned $STATUS" + done || true gcc: name: GCC