From 57d2c38d3c61257faab08860528c8ac97b7dc872 Mon Sep 17 00:00:00 2001 From: Matthias Johnson Date: Tue, 24 Feb 2026 23:08:29 -0700 Subject: [PATCH] Fix badge cache purge by using GitHub API instead of scraping page HTML GitHub's repository page is JS-rendered, so curl gets a skeleton without README images. Use the rendered README API endpoint instead, which returns actual HTML including camo-proxied image URLs. Co-Authored-By: Claude Sonnet 4.6 --- .forgejo/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index caa3d5c..07ad67b 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -18,7 +18,9 @@ jobs: run: shellcheck systab - name: Purge GitHub mirror badge cache run: | - curl -sL https://github.com/opennomad/systab \ + curl -sL \ + -H "Accept: application/vnd.github.html+json" \ + "https://api.github.com/repos/opennomad/systab/readme" \ | grep -oP 'https://camo\.githubusercontent\.com/[^"]+' \ | sort -u \ | xargs -r -I{} curl -sX PURGE '{}' || true