You've already forked dynamic-badges-action
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54d929a33e | ||
|
|
69871bdad6 | ||
|
|
383ef89559 | ||
|
|
b82eb1a788 | ||
|
|
2973573357 | ||
|
|
3425d0daa8 | ||
|
|
5673706ac3 |
@@ -8,7 +8,7 @@ This action allows you to create badges for your README.md with [shields.io](htt
|
||||
|
||||
This action supports all [configuration options of shields.io/endpoint](https://shields.io/endpoint) and can be used in various ways:
|
||||
* Show custom CI statistics from GitHub actions, such as code coverage or detailed test results.
|
||||
* Show metadata of your repository such as [lines of code, comment line percentage](https://schneegans.github.io/tutorials/2020/08/16/badges), ...
|
||||
* Show metadata of your repository such as [lines of code, comment line percentage](https://schneegans.github.io/tutorials/2022/04/18/badges), ...
|
||||
* Basically anything which may change from commit to commit!
|
||||
|
||||
## How Does It Work?
|
||||
@@ -39,7 +39,7 @@ https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/schneegan
|
||||
4. Add something like the following to your workflow:
|
||||
```yml
|
||||
- name: Create Awesome Badge
|
||||
uses: schneegans/dynamic-badges-action@v1.2.0
|
||||
uses: schneegans/dynamic-badges-action@v1.4.0
|
||||
with:
|
||||
auth: ${{ secrets.GIST_SECRET }}
|
||||
gistID: <gist-ID>
|
||||
@@ -114,7 +114,7 @@ For all values in between, the color will be interpolated.
|
||||
- name: Get the Numbers
|
||||
run: echo "ANSWER=42" >> $GITHUB_ENV
|
||||
- name: Create the Badge
|
||||
uses: schneegans/dynamic-badges-action@v1.2.0
|
||||
uses: schneegans/dynamic-badges-action@v1.4.0
|
||||
with:
|
||||
auth: ${{ secrets.GIST_SECRET }}
|
||||
gistID: <gist-ID>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'Dynamic Badges'
|
||||
description: 'Creates badge descriptions to be used with shields.io/endpoint and uploads them to a gist.'
|
||||
description: 'Create badges via shields.io/endpoint for your README.md which may change with every commit.'
|
||||
branding:
|
||||
icon: 'tag'
|
||||
color: 'green'
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# Changelog of the Dynamic Badges Action
|
||||
|
||||
## [Dynamic Badges Action 1.4.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.4.0)
|
||||
|
||||
**Release Date:** 2022-05-15
|
||||
|
||||
#### Changes
|
||||
|
||||
* Fixed a bug which caused the action to fail if the value for the automatic color range was out of bounds. Thanks to [@LucasWolfgang](https://github.com/LucasWolfgang) for this fix!
|
||||
|
||||
## [Dynamic Badges Action 1.3.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.3.0)
|
||||
|
||||
**Release Date:** 2022-04-18
|
||||
|
||||
2
index.js
2
index.js
@@ -25,7 +25,7 @@ try {
|
||||
if (minColorRange != '' && maxColorRange != '' && valColorRange != '') {
|
||||
const max = parseFloat(maxColorRange);
|
||||
const min = parseFloat(minColorRange);
|
||||
const val = parseFloat(valColorRange);
|
||||
let val = parseFloat(valColorRange);
|
||||
|
||||
if (val < min) val = min;
|
||||
if (val > max) val = max;
|
||||
|
||||
Reference in New Issue
Block a user