Skip to content

Commit

Permalink
🔀 Merge pull request #26 from Schneegans/feature/save-svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Schneegans authored Oct 7, 2023
2 parents b7809ee + f2c0926 commit a8a8d67
Show file tree
Hide file tree
Showing 66 changed files with 4,743 additions and 212 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ jobs:
maxColorRange: 100
minColorRange: 0

svg-badge:
name: Create SVG Badge
runs-on: ubuntu-latest
steps:
- name: Create the Badge
uses: schneegans/dynamic-badges-action@master
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 2ab8f1d386f13aaebccbd87dac94068d
filename: badge.svg
label: This is
message: an SVG badge
color: red
labelColor: blue
style: flat-square

color-range-badges:
name: "Create Color Range Badges"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,4 +72,3 @@ jobs:
minColorRange: 50
maxColorRange: 90
valColorRange: ${{ matrix.total }}

136 changes: 76 additions & 60 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
description: 'The ID of the gist to use'
required: true
filename:
description: 'The *.json filename of the badge data'
description: 'The *.json or *.svg filename of the badge data'
required: true
label:
description: 'The left text of the badge'
Expand Down Expand Up @@ -72,5 +72,5 @@ inputs:
description: 'Lightness used by the color range feature. Defaults to 40.'
required: false
runs:
using: 'node16'
using: 'node20'
main: 'index.js'
35 changes: 20 additions & 15 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,70 @@
# Changelog of the Dynamic Badges Action

## [Dynamic Badges Action 1.7.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.7.0)

**Release Date:** TBD

#### Changes

- **SVG Mode:** If your gist filename ends with `.svg` instead of `.json`, the action will now generate an SVG badge instead of a JSON file. This is useful if you cannot use shields.io for some reason. However, this SVG mode does not support all features of shields.io. Thanks to [@runarberg](https://github.com/runarberg) for this contribution!
- The action now runs on Node 20 instead of Node 16.

## [Dynamic Badges Action 1.6.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.6.0)

**Release Date:** 2022-10-13

#### Changes

* The action now runs on Node 16 instead of the deprecated Node 12.

- The action now runs on Node 16 instead of the deprecated Node 12.

## [Dynamic Badges Action 1.5.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.5.0)

**Release Date:** 2022-10-09

#### Changes

* The gist is now not updated anymore if the content did not change. This prevents many gist revisions without actual changes. You can restore the original behavior by setting the optional `forceUpdate` parameter to `true`. A BIG thanks to [@MishaKav](https://github.com/MishaKav) for this contribution!
* Example color range badges have been added to the README.
* All node dependencies have been updated.
- The gist is now not updated anymore if the content did not change. This prevents many gist revisions without actual changes. You can restore the original behavior by setting the optional `forceUpdate` parameter to `true`. A BIG thanks to [@MishaKav](https://github.com/MishaKav) for this contribution!
- Example color range badges have been added to the README.
- All node dependencies have been updated.

## [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!
- 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

#### Changes

* Added the possibility to generate the badge color automatically between red and green based on a numerical value and its bounds. Thanks to [@LucasWolfgang](https://github.com/LucasWolfgang) for this contribution!
- Added the possibility to generate the badge color automatically between red and green based on a numerical value and its bounds. Thanks to [@LucasWolfgang](https://github.com/LucasWolfgang) for this contribution!

## [Dynamic Badges Action 1.2.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.2.0)

**Release Date:** 2022-03-26

#### Changes

* The action does not log the response of writing the Gist anymore.
* Added this changelog.

- The action does not log the response of writing the Gist anymore.
- Added this changelog.

## [Dynamic Badges Action 1.1.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.1.0)

**Release Date:** 2021-06-16

#### Changes

* The action now logs an error message when writing the Gist failed.
* Used new API for setting environment variables in the README.md examples.

- The action now logs an error message when writing the Gist failed.
- Used new API for setting environment variables in the README.md examples.

## [Dynamic Badges Action 1.0.0](https://github.com/Schneegans/dynamic-badges-action/tree/v1.0.0)

**Release Date:** 2020-08-16

#### Changes

* Initial publication on GitHub.

- Initial publication on GitHub.
Loading

0 comments on commit a8a8d67

Please sign in to comment.