https://github.com/angrido/purge-camo-cache
Purge Camo Cache refreshes cached images from camo.githubusercontent.com, ensuring updates are instantly visible
https://github.com/angrido/purge-camo-cache
githubusercontent purgecache
Last synced: 4 months ago
JSON representation
Purge Camo Cache refreshes cached images from camo.githubusercontent.com, ensuring updates are instantly visible
- Host: GitHub
- URL: https://github.com/angrido/purge-camo-cache
- Owner: Angrido
- License: mit
- Created: 2025-04-04T16:53:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-14T09:54:52.000Z (9 months ago)
- Last Synced: 2026-02-10T13:57:44.414Z (4 months ago)
- Topics: githubusercontent, purgecache
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
๐ Purge Camo Cache
Keep your GitHub images fresh!
A GitHub Action that purges cached images served via camo.githubusercontent.com.
---
## โ Why?
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. โก
## ๐ Quick Start
Add this workflow to your repository:
```yaml
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:
```yaml
- name: Purge Camo Cache
uses: Angrido/Purge-Camo-Cache@v1.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
## ๐ฅ Inputs
| Name | Required | Default | Description |
|---------|----------|----------------------|-----------------------------------|
| `token` | No | `${{ github.token }}` | ๐ GitHub token for authentication. |
## โ๏ธ How It Works
1. ๐ฟ Detects the current branch using `tj-actions/branch-names`.
2. ๐ Fetches the repository page and extracts all `camo.githubusercontent.com` image URLs.
3. ๐งน Sends a `PURGE` request to each URL to invalidate the cache.
---
Made with โค๏ธ by Angrido