From d71f35beddfbafd3115dc7eacba1c7514596689c Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Thu, 2 Apr 2026 19:58:18 +0800 Subject: [PATCH] ci: avoid false positives in upstream response checks --- .github/workflows/build-and-publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 6cf8088..215604b 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -121,13 +121,17 @@ jobs: curl --fail --show-error --silent --location --retry 3 --retry-delay 2 --retry-all-errors "$@" } + response_looks_invalid() { + head -n 5 "$1" | grep -Eiq '^(429([[:space:]:]|$)|> ../community/data/geolocation-\!cn && echo browserleaks.org >> ../community/data/geolocation-\!cn for file in ../community/data/*; do - if grep -Eiq '^(429|