Makes the pull count badge possible for these ghcr.io packages:
If we don't yet follow an image, you can either:
- open an issue or
- add it on a new line in
pkg.txt
on your own fork here and make a pull request.
To make a badge, you can modify one of the badges above or generate one with something like shields.io and these parameters:
https://raw.githubusercontent.com/ipitio/ghcr-pulls/master/index.json
You can show either a pretty value like 12K or the raw number like 12345.
$[?(@.owner=="<USER>" && @.repo=="<REPO>" && @.image=="<IMAGE>")].pulls
$[?(@.owner=="<USER>" && @.repo=="<REPO>" && @.image=="<IMAGE>")].raw_pulls
GHCR itself doesn't provide an API endpoint for the pull count, so Github Packages is scraped twice daily for every image in pkg.txt
. In addition to the latest stats, the index also contains a history of the raw pull counts for each image, starting on 2024-06-10, should you find that useful or interesting. Should the pulls for each tag be kept individually as well?
Feel free to help with any of these:
- Make a GitHub Pages site that integrates ghcr-pulls with eggplants/ghcr-badge (or provides an alternative)
- Show each version:
{
...,
"version": {
"<version>": {
"raw_pulls": "365",
"raw_pulls_day": "1",
"raw_pulls_week": "7",
"raw_pulls_month": "30",
"raw_pulls_all": {
"<date>": "365"
}
}
}
}
- Any other improvements or ideas you have