🎉 Add example action

This commit is contained in:
Simon Schneegans
2020-08-16 05:58:41 +02:00
parent 38d09337e2
commit e533b6b203
2 changed files with 23 additions and 2 deletions

21
.github/workflows/badges.yml vendored Normal file
View 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

View File

@@ -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:
```yml
- name: Calculate the Number
- name: Get the Numbers
run: echo "::set-env name=ANSWER::42"
- name: Create the Badge
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
label: The Answer is
message: ${{ env.ANSWER }}
color: purple
color: green
```
# Contributing to Dynamic Badges Action