Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhanushnehru/tryhackme-badge-action-workflow
A github action for tryhackme to fetch and regenerate static badge image which can be used in the Readme
https://github.com/dhanushnehru/tryhackme-badge-action-workflow
action badge cybersecurity github github-actions githubworkflow hacktoberfest hacktoberfest-accepted hacktoberfest2024-accepted marketplace marketplace-solution readme tryhackme workflow workflow-automation
Last synced: 2 months ago
JSON representation
A github action for tryhackme to fetch and regenerate static badge image which can be used in the Readme
- Host: GitHub
- URL: https://github.com/dhanushnehru/tryhackme-badge-action-workflow
- Owner: DhanushNehru
- Created: 2024-07-28T14:32:51.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T16:59:29.000Z (5 months ago)
- Last Synced: 2024-10-13T23:03:53.088Z (2 months ago)
- Topics: action, badge, cybersecurity, github, github-actions, githubworkflow, hacktoberfest, hacktoberfest-accepted, hacktoberfest2024-accepted, marketplace, marketplace-solution, readme, tryhackme, workflow, workflow-automation
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/tryhackme-badge-action-workflow
- Size: 330 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tryhackme-badge-action-workflow
A github action for tryhackme to fetch and regenerate static badge image which can be used in the ReadmeThis is a GitHub Action that fetches your latest TryHackMe badge, downloads it, and commits it to your repository.
### Features
- Fetches the latest badge based on your TryHackMe user ID.
- Downloads the badge image to a specified file path.
- Commits the downloaded image to your repository with a custom message.
- Allows setting a custom committer username.### Usage
- Add this 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).
- user_id: Your TryHackMe user ID (defaults to the value in a secret named THM_USER_ID).```
name: Update TryHackMe Badgeon:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
workflow_dispatch: # Allows manual triggeringjobs:
update-badge:
runs-on: ubuntu-lateststeps:
- name: Checkout repository
uses: actions/checkout@v2- name: Fetch TryHackMe Badge
uses: DhanushNehru/[email protected]
with:
image_path: './assets/tryhackme-badge.png'
username: 'your_tryhackme_username'
user_id: 'your_tryhackme_user_id'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```