Adding badges to your Github profile
Tags: githubactions, badges, acclaim, automation
Published: 2021-03-09 18:54:17


---
title: Adding badges to your Github profile
published: true
date: 2021-03-09 18:03:08 UTC
tags: githubactions,badges,acclaim,automation
canonical_url: https://medium.com/@pemtajo/how-to-improve-your-github-profile-by-adding-badges-2c10363f4f9a
---

#### Badges are a great way to measure professional skills, so why not put them on your GitHub profile?
<img width="100%" style="width:100%" src="https://media.giphy.com/media/XEyYvdfEZTCaaOH3Xi/giphy.gif">
Recently, I started looking for ways to improve my professional skills and with that, I gained several [Acclaim](https://www.youracclaim.com) badges that are easily shared on LinkedIn, but not so easily shared on Github. And that led me to think of easy ways to automate this.

Over time, I became a huge fan of automation.

In programming and day-to-day tasks, It’s important not to waste time on rework.

I was already thinking about automatically updating my Github with these badges as I said before and this mentality joined my desire to create a project where I could learn more about creating actions on Github.

This is a good way to show more effectively what I am studying and still have the opportunity to learn more in the process, consequently generating value for what I am doing.

### Creation the code
<img width="100%" style="width:100%" src="https://media.giphy.com/media/ZVik7pBtu9dNS/giphy.gif">

I started to study the [Acclaim](https://www.youracclaim.com) to see if there were any APIs to receive these values, but I didn’t find anything for the user, just for organizations.

As it was only necessary the name, the image, and possibly the link of the badge I had the idea of ​​using a web scraping on the public website to include the values ​​that I needed. And it worked very well, with that I was able to receive the values ​​and generate HTML tags for the markdown.

But there was still the challenge of creating action on Github and the problem was simpler than I thought. Was just create an [action.yml](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions), put all my code in the docker and it worked as expected.

### Using

Setting up on your GitHub profile is simple, you just need to do this:

1. hit New workflow, set up a workflow yourself, delete all the default content GitHub made for you.
2. Copy the following code and paste it to the new workflow you created at step 1:

```
name: Update badges

on:
  schedule:
    # Runs at 2am UTC
    - cron: "0 2 * * *"
jobs:
  update-readme:
    name: Update Readme with badges
    runs-on: ubuntu-latest
    steps:
      - name: Badges - Readme
        uses: pemtajo/badge-readme@master
          ACCLAIM_USER: <username_acclaim> # optional, but default will use the same from github
```

1. Add a comment to your README.md like this:

```
<!--START_SECTION:badges-->
<!--END_SECTION:badges-->
```

### The result will look like this

![https://github.com/pemtajo](https://cdn-images-1.medium.com/max/907/1*dIjSHN3rUAg8vsZish00MA.png)<figcaption><a href="https://github.com/pemtajo">https://github.com/pemtajo</a></figcaption>

### How to contribute

[pemtajo/badge-readme](https://github.com/pemtajo/badge-readme)

More details on README

Feel free to fork and use.

If you have any problems or have another badge supplier, let’s talk and improve the project.

See you soon!