Displays the number of public repositories owned by a GitHub user or organization.
Clone or download and add to your repository:
| File/folder | Description |
|---|---|
| .github/workflows/update-counter.yml | GitHub Actions workflow |
| theme/ | Digit images 0.png–9.png (beaver theme) |
| counter.json | {"count": 0} — fallback when API fails |
- GitHub → Settings → Developer settings → Personal access tokens
- Create a token with
read:userscope (orrepofor full access) - Copy the token (it is shown only once)
- Your repo → Settings → Secrets and variables → Actions
- New repository secret
- Name:
TRAFFIC_TOKEN - Value: paste the token from step 2
The repository must contain a theme/ folder with files 0.png … 9.png (digits for the counter).
You can get them from the original repository:
- Views_Counter_with_custom_images — theme
Download thethemefolder and place it in the root of your repo.
Insert this line into your README (or keep the one that comes with the repo):
[](https://github.com/Bobr2610/Repositories_count)Autonomous: On the first run, the workflow automatically replaces OWNER/REPO and the branch with your repository — no manual editing needed. It also updates ?v= to a timestamp on each run to avoid cache.
- Automatically: the workflow runs every hour and on push (except for changes to
counter.png,theme/,README.md) - Manually: Actions → Update Repository Counter → Run workflow
- Add the
TRAFFIC_TOKENsecret — Personal Access Token withread:userorrepopermission - The workflow is fully autonomous: it detects the current repository and branch, updates the badge URL automatically (works when forked), and refreshes
counter.pngevery hour and on push
Based on Views_Counter_with_custom_images.
