https://github.com/sgaunet/gh-action-badge
Github action to generate badges. Badges are stored in the wiki of the github project.
https://github.com/sgaunet/gh-action-badge
Last synced: 7 months ago
JSON representation
Github action to generate badges. Badges are stored in the wiki of the github project.
- Host: GitHub
- URL: https://github.com/sgaunet/gh-action-badge
- Owner: sgaunet
- License: mit
- Created: 2025-01-21T20:30:36.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T20:20:43.000Z (8 months ago)
- Last Synced: 2025-02-20T21:27:28.666Z (8 months ago)
- Language: Shell
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-action-badge
This repository contains Github Actions that generate one or more badges that will be hosted in the repository's wiki.
The badge is a svg file that is customizable. Two differents badges can be generated:
* coverage badge with a color that will depend on the coverage value
* simple badge with a fixed color## Usage
### Requirements
You need to create to initialize the wiki of your project. This can be done by creating a new page in the wiki. The page can be empty.

### Coverage badge
| Parameter | Description | Default |
| --- | --- | --- |
| `limit-coverage` | Limit coverage | 0 |
| `color-under-limit` | Color under limit | #e32323 |
| `color-over-limit` | Color over limit | #2db21b |
| `badge-label` | Badge label | coverage |
| `badge-filename` | Badge filename | badge.svg |
| `badge-value` | Badge value | |[Example here](.github/workflows/gh-action-coverage-test.yml)
Resulting badges:


### Fixed color badge
| Parameter | Description | Default |
| --- | --- | --- |
| `badge-color` | Color of the badge | #e32323 |
| `badge-label` | Badge label | |
| `badge-filename` | Badge filename | |
| `badge-value` | Badge value | |[Example here](.github/workflows/gh-action-badge-test.yml)
Resulting badge:

The svg file can be referenced in the main README (or any other markdown file) with the following URL: `https://raw.githubusercontent.com/wiki/USERNAME/REPOSITORY/myimage.png`
**Warning**: the url has a cache mecanism that may take some time to update the image (300s)