You've already forked dynamic-badges-action
🎉 Add example action
This commit is contained in:
21
.github/workflows/badges.yml
vendored
Normal file
21
.github/workflows/badges.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
name: Badges
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
answer-badge:
|
||||||
|
name: Create Answer Badge
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Get the Numbers
|
||||||
|
run: echo "::set-env name=ANSWER::42"
|
||||||
|
- name: Create the Badge
|
||||||
|
uses: schneegans/dynamic-badges-action@master
|
||||||
|
with:
|
||||||
|
auth: ${{ secrets.GIST_SECRET }}
|
||||||
|
gistID: <gist-ID>
|
||||||
|
filename: answer.json
|
||||||
|
label: The Answer is
|
||||||
|
message: ${{ env.ANSWER }}
|
||||||
|
color: green
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ Gist Parameter | Description
|
|||||||
A common usage pattern of this action is to create environment variables in previous steps of a job and later use them as message in your badge. This can be achieved like this:
|
A common usage pattern of this action is to create environment variables in previous steps of a job and later use them as message in your badge. This can be achieved like this:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Calculate the Number
|
- name: Get the Numbers
|
||||||
run: echo "::set-env name=ANSWER::42"
|
run: echo "::set-env name=ANSWER::42"
|
||||||
- name: Create the Badge
|
- name: Create the Badge
|
||||||
uses: schneegans/dynamic-badges-action@v1
|
uses: schneegans/dynamic-badges-action@v1
|
||||||
@@ -94,7 +94,7 @@ A common usage pattern of this action is to create environment variables in prev
|
|||||||
filename: answer.json
|
filename: answer.json
|
||||||
label: The Answer is
|
label: The Answer is
|
||||||
message: ${{ env.ANSWER }}
|
message: ${{ env.ANSWER }}
|
||||||
color: purple
|
color: green
|
||||||
```
|
```
|
||||||
|
|
||||||
# Contributing to Dynamic Badges Action
|
# Contributing to Dynamic Badges Action
|
||||||
|
|||||||
Reference in New Issue
Block a user