Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display

The TryHackMe Badge Action Workflow is a custom GitHub Action that refreshes and displays your TryHackme badge on your GitHub profile or repository README page. This action allows you to maintain your achievements up to date without having to manually download, update, or commit your badge picture each time you acquire a new one.


This content originally appeared on HackerNoon and was authored by Dhanush Nehru

\ As developers, we are constantly seeking for methods to demonstrate our abilities and accomplishments. TryHackMe provides an excellent forum for cybersecurity enthusiasts to learn and demonstrate their expertise. However, manually upgrading your TryHackMe badges can be tedious. That’s why I created the TryHackMe Badge Action Workflow, a GitHub Action that automates the process of displaying your TryHackMe achievements within your GitHub profile or repository.

\

\ In this blog article, I’ll explain why I created this action, how it works, and how you may use it in your own markdown files in github.

Motivation: Automating the Display of Achievements

TryHackMe is a tool that many people in the cybersecurity field use to sharpen their abilities. However, manually updating badges or tracking your progress might be time-consuming, especially if you want to share this information on your GitHub page. I thought of a solution that would automate this process, allowing anyone to demonstrate their TryHackMe achievements with no effort.

What Is the TryHackMe Badge Action Workflow?

The TryHackMe Badge Action Workflow is a custom GitHub Action that refreshes and displays your TryHackMe badge on your GitHub profile or repository README page. This action allows you to maintain your achievements up to date without having to manually download, update, or commit your badge picture each time you acquire a new one.

How It Works

This action updates your GitHub profile or repository README with the new image and retrieves your most recent TryHackMe badge. This is a summary of the workflow’s functions:

  • Image Fetching: The procedure begins with obtaining your TryHackMe badge’s most recent version from a given URL.
  • Commit Changes: The downloaded image is then committed to your repository, guaranteeing that the most recent badge is always visible.
  • README Update: Lastly, the action adds the updated badge image to your README file, allowing you to view your TryHackMe accomplishments in real time.

Usage

  • Add the below script to your GitHub repository as a .yml file (e.g., update-tryhackme-badge.yml).

  • Configure the action with the following inputs:

  • GITHUB_TOKEN: Your GitHub Personal Access Token (required, set as a secret).

  • image_path: The path to store the downloaded badge image (defaults to ./assets/tryhackme-badge.png).

  • username: Your TryHackMe username (defaults to the value in a secret named THM_USERNAME).

  • userid: Your TryHackMe user ID (defaults to the value in a secret named THMUSER_ID).

    \

name: Update TryHackMe Badge

on:
  schedule:
    - cron: '0 0 * * *' # Runs every day at midnight
  workflow_dispatch: # Allows manual triggering

jobs:
  update-badge:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Fetch TryHackMe Badge
      uses: DhanushNehru/tryhackme-badge-action-workflow@v1.0
      with:
        image_path: './assets/tryhackme-badge.png'
        username: 'your_tryhackme_username'
        user_id: 'your_tryhackme_user_id'
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

\ An easy-to-use yet effective solution for automating the display of your security accomplishments is the TryHackMe Badge Action Workflow.

\ If you liked the project as a source of encouragement and support please give it a star ⭐️👇

https://github.com/marketplace/actions/tryhackme-badge-action-workflow?embedable=true

\ I have used this in my Github README.md so feel free to check it out


Thanks for reading, please give a like as a sort of encouragement and also share this post in socials to show your extended support.

\ Connect ⬇️

\ X / Instagram / Github / Youtube / Newsletter / Discord


This content originally appeared on HackerNoon and was authored by Dhanush Nehru


Print Share Comment Cite Upload Translate Updates
APA

Dhanush Nehru | Sciencx (2024-08-13T08:17:29+00:00) Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display. Retrieved from https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/

MLA
" » Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display." Dhanush Nehru | Sciencx - Tuesday August 13, 2024, https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/
HARVARD
Dhanush Nehru | Sciencx Tuesday August 13, 2024 » Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display., viewed ,<https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/>
VANCOUVER
Dhanush Nehru | Sciencx - » Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/
CHICAGO
" » Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display." Dhanush Nehru | Sciencx - Accessed . https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/
IEEE
" » Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display." Dhanush Nehru | Sciencx [Online]. Available: https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/. [Accessed: ]
rf:citation
» Introducing the TryHackMe Badge Action Workflow: Automate Your Security Achievements Display | Dhanush Nehru | Sciencx | https://www.scien.cx/2024/08/13/introducing-the-tryhackme-badge-action-workflow-automate-your-security-achievements-display-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.