Fix badge cache purge by using GitHub API instead of scraping page HTML
All checks were successful
CI / shellcheck (push) Successful in 16s

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 <noreply@anthropic.com>
This commit is contained in:
Matthias Johnson 2026-02-24 23:08:29 -07:00
parent 28170d02d0
commit 57d2c38d3c

View file

@ -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