Keep your GitHub images fresh!
A GitHub Action that purges cached images served via camo.githubusercontent.com.
GitHub uses Camo as a caching proxy to serve images securely. But Camo doesn't refresh images automatically — so your badges and images can stay stale for hours. This action forces a cache purge so updates show up instantly. ⚡
Add this workflow to your repository:
name: Purge Camo Cache
on:
push:
branches:
- main
schedule:
- cron: '0 */2 * * *'
jobs:
purge-camo-cache:
runs-on: ubuntu-latest
steps:
- name: Purge Camo Cache
uses: Angrido/Purge-Camo-Cache@v1.3.0🔒 For private repositories, pass a token with read access:
- name: Purge Camo Cache
uses: Angrido/Purge-Camo-Cache@v1.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}| Name | Required | Default | Description |
|---|---|---|---|
token |
No | ${{ github.token }} |
🔑 GitHub token for authentication. |
- 🌿 Detects the current branch using
tj-actions/branch-names. - 🔍 Fetches the repository page and extracts all
camo.githubusercontent.comimage URLs. - 🧹 Sends a
PURGErequest to each URL to invalidate the cache.
Made with ❤️ by Angrido