Giter Site home page Giter Site logo

emibcn / badge-to-branch-action Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 17 KB

Action to generate a SVG badge and publish it committing and pushing to a dedicated branch in the same repository

License: GNU General Public License v3.0

Shell 100.00%
github-action badge-generator branches svg

badge-to-branch-action's Introduction

Badge action - Save to dedicated branch

This action generates a SVG badge using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers). The badge is generated using the NPM package gradient-badge by badge-action. Once the badge is generated, save it into a dedicated branch on the same repository.

This is a composite action. Most of its inputs are passed through to (from badge-action).

Inputs

label

Required The left label of the badge, usually static.

label-color

Required Hex or named color for the label. Default: 555

status

Required The right status as the badge, usually based on results.

color

Required An array (comma separated) with hex or named colors of the badge value background. More than one creates gradient background. Default: blue.

style

Required Badge style: flat or classic. Default: classic

icon

Use icon.

icon-width

Set this if icon is not square. Default: 13

scale

Set badge scale. Default: 1

filename

File name for the generated SVG image (for example: test-coverage.svg).

path

The path to store the badges branch while creating and commiting. Defaults to badges.

branch

Branch to store the badges images. Defaults to badges.

github_token

The GITHUB_TOKEN used to push the commit with the generated badge. Use ${{ secrets.GITHUB_TOKEN }}.

Outputs

badge

The badge SVG contents.

public_url

The public URL for the generated badge.

Example usage

uses: emibcn/badge-to-branch-action@v1
with:
  label: 'Test coverage'
  status: '53.4%'
  color: 'blue,555,daf'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.