mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
🏷️ Create re-useable 'make badge' action (#126)
This commit is contained in:
24
.github/actions/badge/action.yml
vendored
Normal file
24
.github/actions/badge/action.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Make a Basge
|
||||
description: Creates a JSON file for use with Sheilds.io. The default is a "brightgreen" "Passing" badge
|
||||
inputs:
|
||||
category:
|
||||
description: The subfolder where to group the badges
|
||||
required: true
|
||||
label:
|
||||
description: The label to you in the badge (this should be unqie for each badge in a category)
|
||||
required: true
|
||||
message:
|
||||
description: The message you wish to have in the badge
|
||||
required: false
|
||||
default: "Passing"
|
||||
color:
|
||||
description: The color you wish the badge to be
|
||||
required: false
|
||||
default: "brightgreen"
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- run: |
|
||||
mkdir -p badges/${{ inputs.category }}/${{ inputs.label }}
|
||||
echo '{ "schemaVersion": 1, "label": "${{ inputs.label }}", "message": "${{ inputs.message }}", "color": "${{ inputs.color }}" }' > badges/${{ inputs.category }}/${{ inputs.label }}/shields.json
|
||||
shell: bash
|
||||
16
.github/workflows/libresssl.yml
vendored
16
.github/workflows/libresssl.yml
vendored
@@ -36,15 +36,19 @@ jobs:
|
||||
|
||||
- name: badge success
|
||||
if: github.event_name == 'push' && success()
|
||||
run: |
|
||||
mkdir -p badges/libressl/${{ matrix.libressl }}
|
||||
echo '{ "schemaVersion": 1, "label": "${{ matrix.libressl }}", "message": "Passing", "color": "brightgreen" }' > badges/libressl/${{ matrix.libressl }}/shields.json
|
||||
uses: ./.github/actions/badge
|
||||
with:
|
||||
category: libressl
|
||||
label: ${{ matrix.libressl }}
|
||||
|
||||
- name: badge failure
|
||||
if: github.event_name == 'push' && !success()
|
||||
run: |
|
||||
mkdir -p badges/libressl/${{ matrix.libressl }}
|
||||
echo '{ "schemaVersion": 1, "label": "${{ matrix.libressl }}", "message": "Failing", "color": "red" }' > badges/libressl/${{ matrix.libressl }}/shields.json
|
||||
uses: ./.github/actions/badge
|
||||
with:
|
||||
category: libressl
|
||||
label: ${{ matrix.libressl }}
|
||||
message: Failing
|
||||
color: red
|
||||
|
||||
- name: badge publish
|
||||
if: github.event_name == 'push'
|
||||
|
||||
Reference in New Issue
Block a user