Simplify curl-impersonate installation in workflow

Removed the build steps for curl-impersonate and replaced it with a direct installation command.
This commit is contained in:
Kroese 2026-03-23 15:01:38 +01:00 committed by GitHub
parent c77d4cdde3
commit 75165ef15c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,25 +21,6 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
-
name: Build curl-impersonate
run: |
sudo apt install build-essential pkg-config cmake ninja-build curl autoconf automake libtool
# For the Firefox version only
sudo apt install python3-pip libnss3
pip install gyp-next
export PATH="$PATH:~/.local/bin" # Add gyp to PATH
git clone https://github.com/lwthiker/curl-impersonate.git
cd curl-impersonate
mkdir build && cd build
../configure
# Build and install the Firefox version
make firefox-build
sudo make firefox-install
# You may need to update the linker's cache to find libcurl-impersonate
sudo ldconfig
# Optionally remove all the build files
cd ../ && rm -Rf build
-
name: Validate Links
run: |
@ -47,11 +28,12 @@ jobs:
count=0
host=""
declare -A seen
sudo apt-get install curl-impersonate
check() {
local url="$1" http
http=$(curl_ff117 -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000"
http=$(curl_ff -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -I -- "$url" 2>&1) || http="000"
[[ "$http" == 2* ]] && return 0
http=$(curl_ff117 -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
http=$(curl_ff -sSL -o /dev/null -w "%{http_code}" --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0)" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000"
printf '%s\n' "HTTP: $http"
[[ "$http" == 2* ]]
}