Skip to content

Angrido/Purge-Camo-Cache

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

GitHub Action MIT License

🔄 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:

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

📥 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

About

A GitHub Action that purges camo.githubusercontent.com cached images so your badges and README images stay always up to date.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors