Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
award

GitHub Action

Points Bar

v1.3.0

Points Bar

award

Points Bar

Generates a points/progress SVG bar

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Points Bar

uses: markpatterson27/[email protected]

Learn more about this action in markpatterson27/points-bar

Choose a version

Points Bar Action

units-test

A GitHub action that creates an SVG points bar.

points bar
points badge points badge reversed

Usage

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

Inputs

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.

Examples

Default

points bar

- name: points bar
  uses: markpatterson27/points-bar@v1
  with:
    points: '25/50'
    path: '.github/icons/points-bar.svg'

Badge

points badge

- name: points badge
  uses: markpatterson27/points-bar@v1
  with:
    points: '25/50'
    path: '.github/icons/points-badge.svg'
    type: 'badge'

Text and Bar Color

points bar color

- 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'

Label

points bar custom label

- name: points bar
  uses: markpatterson27/points-bar@v1
  with:
    points: '25/50'
    path: '.github/icons/points-bar-custom-label.svg'
    label: 'Score'

points badge custom label

- name: autograde badge
  uses: markpatterson27/points-bar@v1
  with:
    points: '25/50'
    path: '.github/icons/points-badge-custom-label.svg'
    type: 'badge'
    label: 'Autograde'

Width

points bar wide

- name: points bar
  uses: markpatterson27/points-bar@v1
  with:
    points: '25/50'
    path: '.github/icons/points-bar-wide.svg'
    width: 220

Reversed

points badge reversed

- 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

Alternatives

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.