# ghcr-badge: Generate ghcr.io container's status badge
[![1] ![2] ![3]](https://github.com/eggplants/ghcr-badge/pkgs/container/ghcr-badge)
[![PyPI version](
<https://badge.fury.io/py/ghcr-badge.svg>
)](
<https://badge.fury.io/py/ghcr-badge>
) [![pre-commit.ci status](
<https://results.pre-commit.ci/badge/github/eggplants/ghcr-badge/master.svg>
)](
<https://results.pre-commit.ci/latest/github/eggplants/ghcr-badge/master>
) [![Maintainability](
<https://api.codeclimate.com/v1/badges/f77401f6fb543dd8c436/maintainability>
)](
<https://codeclimate.com/github/eggplants/ghcr-badge/maintainability>
) [![Release Package](
<https://github.com/eggplants/ghcr-badge/actions/workflows/release.yml/badge.svg>
)](
<https://github.com/eggplants/ghcr-badge/actions/workflows/release.yml>
)
## Motivation
<https://github.com/badges/shields/issues/5594>
## Deployment
[![Deploying on Deta Space](
<https://img.shields.io/badge/deploying%20on-Deta%20Space-F26DAA>
)](
<https://deta.space/discovery/@eggplants/ghcrbadge>
)
- <https://ghcr-badge.egpl.dev/>
- [![Website](https://img.shields.io/website?label=egpl.dev&url=https%3A%2F%2Fghcr-badge.egpl.dev)](https://ghcr-badge.egpl.dev)
- <https://ghcr-badge.deta.dev/>
- [![Website](https://img.shields.io/website?label=deta.dev&url=https%3A%2F%2Fghcr-badge.deta.dev)](https://ghcr-badge.deta.dev)
## Available paths
- `/<package_owner>/<package_name>/tags?color=...&ignore=...&n=...&label=...&trim=...`
- defaults: `color=#44cc11`, `ignore=latest`, `n=3`, `label=image tags`
- <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/tags?trim=major>
- 👉: ![1]
- `/<package_owner>/<package_name>/latest_tag?color=...&ignore=...&label=...&trim=...`
- defaults: `color=#44cc11`, `ignore=latest`, `label=version`
- <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/latest_tag?trim=major&label=latest>
- 👉: ![2]
- `/<package_owner>/<package_name>/size?color=...&tag=...&label=...&trim=...`
- defaults: `color=#44cc11`, `tag=latest`, `label=image size`
- <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/size>
- 👉: ![3]
## Common parameters
### `label` parameter
- `label=hello`: ![label=hello](https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/tags?trim=major&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]: <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/tags?trim=major>
[2]: <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/latest_tag?trim=major&label=latest>
[3]: <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/size>
## 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`
Raw data
{
"_id": null,
"home_page": "https://github.com/eggplants/ghcr-badge",
"name": "ghcr_badge",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.8",
"maintainer_email": null,
"keywords": "github-container-registry, badge, ghcr",
"author": "eggplants",
"author_email": "w10776e8w@yahoo.co.jp",
"download_url": "https://files.pythonhosted.org/packages/ee/86/c151e4562e2f2f215e07cdb49bed610e8c6b1a248f07ab97de2f24dfb522/ghcr_badge-0.4.0.tar.gz",
"platform": null,
"description": "# ghcr-badge: Generate ghcr.io container's status badge\n\n[![1] ![2] ![3]](https://github.com/eggplants/ghcr-badge/pkgs/container/ghcr-badge)\n\n[![PyPI version](\n <https://badge.fury.io/py/ghcr-badge.svg>\n )](\n <https://badge.fury.io/py/ghcr-badge>\n) [![pre-commit.ci status](\n <https://results.pre-commit.ci/badge/github/eggplants/ghcr-badge/master.svg>\n )](\n <https://results.pre-commit.ci/latest/github/eggplants/ghcr-badge/master>\n) [![Maintainability](\n <https://api.codeclimate.com/v1/badges/f77401f6fb543dd8c436/maintainability>\n )](\n <https://codeclimate.com/github/eggplants/ghcr-badge/maintainability>\n) [![Release Package](\n <https://github.com/eggplants/ghcr-badge/actions/workflows/release.yml/badge.svg>\n )](\n <https://github.com/eggplants/ghcr-badge/actions/workflows/release.yml>\n)\n\n## Motivation\n\n<https://github.com/badges/shields/issues/5594>\n\n## Deployment\n\n[![Deploying on Deta Space](\n <https://img.shields.io/badge/deploying%20on-Deta%20Space-F26DAA>\n )](\n <https://deta.space/discovery/@eggplants/ghcrbadge>\n)\n\n- <https://ghcr-badge.egpl.dev/>\n - [![Website](https://img.shields.io/website?label=egpl.dev&url=https%3A%2F%2Fghcr-badge.egpl.dev)](https://ghcr-badge.egpl.dev)\n\n- <https://ghcr-badge.deta.dev/>\n - [![Website](https://img.shields.io/website?label=deta.dev&url=https%3A%2F%2Fghcr-badge.deta.dev)](https://ghcr-badge.deta.dev)\n\n## Available paths\n\n- `/<package_owner>/<package_name>/tags?color=...&ignore=...&n=...&label=...&trim=...`\n - defaults: `color=#44cc11`, `ignore=latest`, `n=3`, `label=image tags`\n - <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/tags?trim=major>\n - \ud83d\udc49: ![1]\n- `/<package_owner>/<package_name>/latest_tag?color=...&ignore=...&label=...&trim=...`\n - defaults: `color=#44cc11`, `ignore=latest`, `label=version`\n - <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/latest_tag?trim=major&label=latest>\n - \ud83d\udc49: ![2]\n- `/<package_owner>/<package_name>/size?color=...&tag=...&label=...&trim=...`\n - defaults: `color=#44cc11`, `tag=latest`, `label=image size`\n - <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/size>\n - \ud83d\udc49: ![3]\n\n## Common parameters\n\n### `label` parameter\n\n- `label=hello`: ![label=hello](https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/tags?trim=major&label=hello)\n\n### `ignore` parameter\n\nUse the ignore parameter to filter returned tags, supports pattern matching and a comma separated list.\n\n- `ignore=latest` ignores the `latest` tag (default).\n- `ignore=sha256*` ignores all tags prefixed with `sha256`.\n- `ignore=v0.0.1,latest,sha256*` ignores the `latest` and `v0.0.1` tags, and all tags prefixed with `sha256*`.\n\n### `trim` parameter\n\n- `trim=patch` trims `^v?\\d+\\.\\d+\\.\\d+[^.]*$` tags.\n- `trim=major` trims `^v?\\d+\\.\\d+[^.]*$` tags.\n\n### `color` parameter\n\nAvailable color names and hex codes are listed on [here](https://github.com/jongracecox/anybadge#colors).\n\n## Note\n\nGenerated badge will be cached for 3666 seconds in GitHub's [Camo](https://github.com/atmos/camo) server.\nTo update immediately, send PURGE request to the badge Camo link.\n\n```bash\ncurl -X PURGE \"https://camo.githubusercontent.com/...\"\n```\n\n[1]: <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/tags?trim=major>\n[2]: <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/latest_tag?trim=major&label=latest>\n[3]: <https://ghcr-badge.egpl.dev/eggplants/ghcr-badge/size>\n\n## Development\n\n1. Install [`poetry`](https://python-poetry.org/docs/#installation)\n1. Run `poetry install && poetry shell && pre-commit install`\n1. Launch live server with `task dev`\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Generate ghcr.io container's status badge",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/eggplants/ghcr-badge",
"Repository": "https://github.com/eggplants/ghcr-badge"
},
"split_keywords": [
"github-container-registry",
" badge",
" ghcr"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "df36e62c179fd7ac537a0cbaebf3fe8a4047446f671cc6f3ca140d47b0c956c3",
"md5": "593edce6fbeacf11b9a7f38a86f0b6de",
"sha256": "75c330d5eaf2f205b6e262a7af9263a81e8864e7b5ff018687d8fc934f25145f"
},
"downloads": -1,
"filename": "ghcr_badge-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "593edce6fbeacf11b9a7f38a86f0b6de",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.8",
"size": 56253,
"upload_time": "2024-03-24T23:35:52",
"upload_time_iso_8601": "2024-03-24T23:35:52.428173Z",
"url": "https://files.pythonhosted.org/packages/df/36/e62c179fd7ac537a0cbaebf3fe8a4047446f671cc6f3ca140d47b0c956c3/ghcr_badge-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ee86c151e4562e2f2f215e07cdb49bed610e8c6b1a248f07ab97de2f24dfb522",
"md5": "9ff319ae6988403c5e1b909d3e703ce1",
"sha256": "92c105b42e2dec76ea3877e1c9528f4e37a7e379bf832ad939758fb12baad1c2"
},
"downloads": -1,
"filename": "ghcr_badge-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "9ff319ae6988403c5e1b909d3e703ce1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.8",
"size": 57233,
"upload_time": "2024-03-24T23:35:53",
"upload_time_iso_8601": "2024-03-24T23:35:53.545702Z",
"url": "https://files.pythonhosted.org/packages/ee/86/c151e4562e2f2f215e07cdb49bed610e8c6b1a248f07ab97de2f24dfb522/ghcr_badge-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-24 23:35:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eggplants",
"github_project": "ghcr-badge",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ghcr_badge"
}