https://github.com/eggplants/ghcr-badge
Generate ghcr.io (GitHub Container Registory) container's status badge
https://github.com/eggplants/ghcr-badge
badge badge-maker ghcr github metadata status svg
Last synced: 8 days ago
JSON representation
Generate ghcr.io (GitHub Container Registory) container's status badge
- Host: GitHub
- URL: https://github.com/eggplants/ghcr-badge
- Owner: eggplants
- License: mit
- Created: 2022-05-12T21:19:34.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-03-04T15:45:05.000Z (about 1 month ago)
- Last Synced: 2025-03-31T06:01:39.848Z (15 days ago)
- Topics: badge, badge-maker, ghcr, github, metadata, status, svg
- Language: Python
- Homepage: https://ghcr-badge.egpl.dev
- Size: 812 KB
- Stars: 41
- Watchers: 1
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- jimsghstars - eggplants/ghcr-badge - Generate ghcr.io (GitHub Container Registory) container's status badge (Python)
README
# ghcr-badge: Generate ghcr.io container's status badge
[![1] ![2] ![3]](https://github.com/eggplants/ghcr-badge/pkgs/container/ghcr-badge)
[](
) [](
) [](
) [](
)## Motivation
## Deployment
[![Deploy to Render]](https://render.com/deploy?repo=https://github.com/eggplants/ghcr-badge)
-
- [](https://ghcr-badge.egpl.dev)- ~~
- Deta Space was [closed](https://deta.space/sunset)[Deploy to Render]:
## Available paths
- `///tags?color=...&ignore=...&n=...&label=...&trim=...`
- defaults: `color=#44cc11`, `ignore=latest`, `n=3`, `label=image tags`
-
- 👉: ![1]
- `///latest_tag?color=...&ignore=...&label=...&trim=...`
- defaults: `color=#44cc11`, `ignore=latest`, `label=version`
-
- 👉: ![2]
- `///size?color=...&tag=...&label=...&trim=...`
- defaults: `color=#44cc11`, `tag=latest`, `label=image size`
-
- 👉: ![3]## Common parameters
### `label` parameter
- `label=hello`: 
### `ignore` parameter
Use the ignore parameter to filter returned tags, supports pattern matching and a comma separated list.
- `ignore=latest` ignores the `latest` tag (default).
- `ignore=sha256*` ignores all tags prefixed with `sha256`.
- `ignore=v0.0.1,latest,sha256*` ignores the `latest` and `v0.0.1` tags, and all tags prefixed with `sha256*`.### `trim` parameter
- `trim=patch` trims `^v?\d+\.\d+\.\d+[^.]*$` tags.
- `trim=major` trims `^v?\d+\.\d+[^.]*$` tags.### `color` parameter
Available color names and hex codes are listed on [here](https://github.com/jongracecox/anybadge#colors).
## Note
Generated badge will be cached for 3666 seconds in GitHub's [Camo](https://github.com/atmos/camo) server.
To update immediately, send PURGE request to the badge Camo link.```bash
curl -X PURGE "https://camo.githubusercontent.com/..."
```[1]:
[2]:
[3]:## Development
1. Install [`poetry`](https://python-poetry.org/docs/#installation)
1. Run `poetry install && poetry shell && pre-commit install`
1. Launch live server with `task dev`