DEV Community

Rocktim Saikia
Rocktim Saikia

Posted on • Updated on

Badge it- A Github Action to automate the process of adding Badges to your Readme.

Hi, Myself Rocktim and this is my submission for Actionshackathon.

My Workflow

What is Badge-it?

Badge-it is a simple GitHub action that automates the process of adding the Badges to your projects Readme ⚡ We all love to add badges to our GitHub projects to decorate it in a way so that the project does not look dull.

But the process of adding badges every time you create a GitHub project can be quite tedious. From all the copy-pasting to configuring your github_username and repo_name. And that's what I tried to solve with Badge-it. It saves you the time of configuring and adding badges
yourself manually.

Submission Category:

I am submitting this action under the following categories.

  • Interesting IoT
  • Wacky Wildcards)

Yaml File or Link to Code

Usage

The action takes 3 inputs.

  • A Github token
  • A string of badges separated by commas(,)
  • A base style for your badges.
      - name: Add Badges
        uses: rocktimsaikia/badge-it@master
        with:
          GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
          badges: 'gh_license, gh_version, github_stars'
          badge-style: 'flat-square'
Enter fullscreen mode Exit fullscreen mode

Bagde-it Repo

GitHub logo rocktimsaikia / badge-it

Github action to automatically add badges to your readme ⚡

badge-it Build Status

Github action to automatically add shield badges to your README.md ⚡

A Github action to add badges in your README.md without any hassle. We love badges but generially it's a tedious job to copy paste badges from shield.io to your README.md .So this Action helps to add badges without you having to do all the copy pasting and configuration.

Usage

  • Badges - To add your preffered badge, check it's correspoding key in the Availabe Badges section below and add the key in the badges input seperated by commas (,).

  • Badge Style - To specifiy style for your badges .Add your preffered badge style in the badge-style input. Default is flat.

- name: Add Badges
  uses: rocktimsaikia/badge-it@master
  with:
    GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
    badges: 'gh_license, gh_version, gh_stars'
    badge-style: 'flat-square'
Enter fullscreen mode Exit fullscreen mode

Inputs

  • GITHUB_TOKEN - A personal Github token.
  • badges

Additional Resources / Info

Currently, there is no open-source project using this action. So in the meantime, I am linking a demo repository for demo purposes.

Thank you for taking the time and checking out badge-it. If you like the project don't forget to add a star ⚡ or if you want to contribute you are more then welcome. 🚀

Update 🚀 ⚡

newly added badges will be updated here

avavilabe badges

Top comments (13)

Collapse
 
pujux profile image
Julian Pufler

Hey there! I built an API that serves specific github related user badges for profile readmes but the newest ones I added can also be useful in repositories, you might wanna have a look and add them in to your service maybe!

Collapse
 
rocktimsaikia profile image
Rocktim Saikia • Edited

Hi. Looks like a very interesting project. But the idea is not gonna suit to the needs of this action I guess. Since this action is just trying to take away the pain of setting up generally used common badges yourself instead of adding totally new type badges. But I do like the project and especially the last updated badge so I might add that in the next version update of the action 🙏. Thanks for recommending :)

Collapse
 
pujux profile image
Julian Pufler

No worries, your project is also really nice! Keep it up! 👍

Collapse
 
pablohs1986 profile image
Pablo Herrero

Cool!!!

Collapse
 
rocktimsaikia profile image
Rocktim Saikia

Thank you :)

Collapse
 
bradtaniguchi profile image
Brad

After just struggling with manually adding some badges myself, this is a great idea!

Collapse
 
rocktimsaikia profile image
Rocktim Saikia

Thank you. Glad you liked the idea :). I am still adding more badges and especially working on a feature to be able to add badges that require some sort of other configuration rather than Github like for Funding and CI related badges. Hopefully, most of the badges and features will be implemented before this hackathon.

Collapse
 
fkrasnowski profile image
Franciszek Krasnowski

Great idea! I look forward to seeing more badges supported

Collapse
 
rocktimsaikia profile image
Rocktim Saikia

Thank you. I will update the post once the other essential and commonly used badges are added.

Collapse
 
fennecdjay profile image
Jérémie Astor

That's an idea!

You might have a typo.

badge-style: 'flat-sqaure'

Collapse
 
rocktimsaikia profile image
Rocktim Saikia

ah, thank you. I'll fix that.

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

This is awesome!! 🤩

Collapse
 
rocktimsaikia profile image
Rocktim Saikia • Edited

Thank you very much 🦄⚡. This action still needs some optimization. I did publish a working version with limited badges but tonight will fix any type of errors and will try to add more configurable badges specially for CI for platforms like TravisCI.