Badge Configurator
Generate a custom badge URL for any repository connected to Cloudflare Workers Builds.
Enter a username and repository to generate a badge.
Examples
These are real, live badges from this very project, shown in a few different Shields.io styles. Any Shields query parameter is supported.
What is Cloudflare Build Badge?
Cloudflare Build Badge is a Cloudflare Worker that generates SVG badges showing the build status of any repository deployed with Cloudflare Workers Builds, ready to embed in your README or website.
The problem it solves
GitHub doesn't ship a native status badge for Cloudflare Workers & Pages checks the way it does for GitHub Actions. This project fills that gap by querying the GitHub Checks API and translating the result into a Shields.io badge, without requiring any setup in your repository.
How It Works
Every badge request goes through these four steps at the edge of Cloudflare's network.
The request reaches the Worker
Cloudflare WorkerYou request the badge URL for any GitHub repository connected to Cloudflare Workers Builds.
Fetch the check status
GitHub Checks APIThe Worker queries the GitHub API for the latest Cloudflare Workers & Pages check on the requested branch.
Build the badge image
Shields.ioThe check status is mapped to a Shields.io badge and rendered as an SVG image.
Return the badge
SVG responseThe badge updates automatically every time the URL is requested again.
Deploy Your Own
Start from the template and follow these steps to get your own instance running.
-
1. Copy the template
Run this command:
pnpm create astro@latest cloudflare-build-badge --template Xeffen25/cloudflare-build-badge --install --git -
2. Push to GitHub and connect Cloudflare
Push the repository to GitHub, connect it in Cloudflare Workers Builds, and ignore the first few failing builds while you finish the setup.
Cloudflare dashboard -
3. Update the project identity
Set your domain in "site" inside astro.config.mjs and update the worker name in wrangler.jsonc.
-
4. Configure Wrangler routing
Option A: keep "route.pattern" to use a custom domain.
Option B: remove "route" and set "workers_dev: true" to use a workers.dev subdomain.
-
5. Configure the GitHub token secret
Create a classic GitHub token with read-only "repo" access and store it with Wrangler:
Create a classic GitHub tokenpnpm wrangler secret put GITHUB_TOKEN -
6. Make your next commit
Run these commands:
git add .git commit -m "Set up for me"