From d8e51d89653c5408e9ffcb556dc4f932ac808b60 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 23 Mar 2026 13:36:57 +0100 Subject: [PATCH 1/3] build: Add workflow to validate download links (#1680) --- .github/workflows/links.yml | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/links.yml diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000..1ddedbb --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,64 @@ +name: Links + +on: + workflow_dispatch: + +concurrency: + group: links + cancel-in-progress: false + +jobs: + links: + name: Links + runs-on: ubuntu-latest + permissions: + actions: read + packages: read + contents: read + steps: + - + name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + - + name: Validate Links + run: | + errors=0 + count=0 + host="" + declare -A seen + check() { + local url="$1" http + http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000" + [[ "$http" == 2* ]] && return 0 + http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" + [[ "$http" == 2* ]] + } + while IFS= read -r line; do + if [[ "$line" =~ ^[[:space:]]*local[[:space:]]+host=\"(https://[^\"]+)\" ]]; then + host="${BASH_REMATCH[1]%/}" + continue + fi + [[ "$line" =~ ^[[:space:]]*url=\"(.+)\" ]] || continue + val="${BASH_REMATCH[1]#/}" + if [[ "$val" == https://* ]]; then + url="$val" + elif [[ -n "$host" ]]; then + url="$host/$val" + else + continue + fi + [[ -v seen[$url] ]] && continue + seen[$url]=1 + count=$((count + 1)) + if check "$url"; then + echo " OK: $url" + else + echo "FAIL: $url" + errors=$((errors + 1)) + fi + done < "src/define.sh" + echo "" + printf '%d/%d links valid\n' "$(( count - errors ))" "$count" + (( errors == 0 )) From 4d01a81586f7051f7cb9d30a8e3ef24d40c410ee Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 23 Mar 2026 15:17:26 +0100 Subject: [PATCH 2/3] build: Use Firefox impersonation while checking links (#1681) --- .github/workflows/links.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index 1ddedbb..b054901 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -28,11 +28,14 @@ jobs: count=0 host="" declare -A seen + wget https://github.com/lwthiker/curl-impersonate/releases/download/v0.6.1/curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz + tar -xzf curl-impersonate-v0.6.1.x86_64-linux-gnu.tar.gz + sudo cp curl-impersonate-ff /usr/local/bin/ check() { local url="$1" http - http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000" + http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -I -- "$url" 2>&1) || http="000" [[ "$http" == 2* ]] && return 0 - http=$(curl -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" + http=$(curl-impersonate-ff -sSL -o /dev/null -w "%{http_code}" --max-time 10 -r "0-0" -- "$url" 2>&1) || http="000" [[ "$http" == 2* ]] } while IFS= read -r line; do From 5abdb34173e47e4a1d4afd9ac88fb5bbff7c70b4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 14:18:34 +0000 Subject: [PATCH 3/3] chore(deps): update docker/login-action action to v4 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6bd154b..51e29b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,13 +46,13 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login into Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }}