You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Points Bar
v1.3.0
A GitHub action that creates an SVG points bar.
name: Update Points Bar
on:
push:
jobs:
update:
name: Update points bar
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# create points bar
- name: points bar
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: 'points-bar.svg'
# commit and push points-bar if changed
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add 'points-bar.svg'
git commit -m "Add/Update points bar" || exit 0
git push
Input Name | Required | Default | Description |
---|---|---|---|
points |
yes | Points string separated with a / slash. | |
path |
yes | File path to save the generated SVG to. | |
type |
no | 'default' | Style of bar to generate. Can be either 'default' or 'badge'. |
bar-color |
no | Color to use for the points bar. | |
bar-background |
no | Background color for the points bar. | |
font-color |
no | Color to use for text. | |
label |
no | 'Points' | Text to use for label part of points bar. |
width |
no | Bar/badge width. | |
reverse |
no | 'false' | Reverse the progress direction of the bar. i.e. Progress bar moves from right to left. |
- name: points bar
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-bar.svg'
- name: points badge
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-badge.svg'
type: 'badge'
- name: points bar color
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-bar-color.svg'
bar-color: 'gold'
bar-background: '#115544'
font-color: '#BF5700'
- name: points bar
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-bar-custom-label.svg'
label: 'Score'
- name: autograde badge
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-badge-custom-label.svg'
type: 'badge'
label: 'Autograde'
- name: points bar
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-bar-wide.svg'
width: 220
- name: points badge reversed
uses: markpatterson27/points-bar@v1
with:
points: '25/50'
path: '.github/icons/points-badge-reversed.svg'
type: 'badge'
bar-color: '#11BBCC'
bar-background: '#88BBCC'
reverse: true
Badge Action creates a customizable badge with many styling options. Useful if you want a customizable badge and don't need a progress style points bar.