Description
Related with #17
📌 Summary
To enhance engagement and interactivity in the repository, we can implement an automated badge system using GitHub Actions. This system will recognize contributors who complete the learning journey and award them achievement badges, displayed in a Hall of Fame inside the README.
🎯 Proposed Solution
1️⃣ Users Claim Their Badge via an Issue
-
Participants who complete the learning journey can open a new issue with the title:
"[Badge Request] – @githubusername" -
In the issue description, they will state which achievements they have completed.
2️⃣ GitHub Action Updates the README
-
A GitHub Action will detect new issues with the
[Badge Request]
prefix. -
It will automatically append the contributor’s name and badge to the Hall of Fame section in the README.
3️⃣ Example: Hall of Fame Section in README
Once the GitHub Action runs, the README will be updated dynamically:
## 🏆 Hall of Fame – AI Journey Achievers
- @user1 - 🎖 **Time Traveler**
- @user2 - 🏆 **Lighthouse Architect**
- @user3 - 🤖 **AI Whisperer**
🛠 Implementation Steps
1️⃣ Create a GitHub Action Workflow
-
Add a new workflow file at
.github/workflows/add-badge.yml
-
This workflow will:
- Detect new issues with
[Badge Request]
in the title. - Extract the GitHub username.
- Append the username and badge to the README file.
- Commit the updated README back to the repository.
- Detect new issues with
2️⃣ Example GitHub Action Workflow (add-badge.yml)
name: Add Achievement Badge
on:
issues:
types: [opened]
permissions:
contents: write
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Extract GitHub username
run: |
echo "- @${{ github.event.issue.user.login }} - 🏆 **Achievement Unlocked**" >> README.md
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions@github.com'
git add README.md
git commit -m "Added @${{ github.event.issue.user.login }} to Hall of Fame"
git push
✅ Expected Outcome
🔹 Users can claim their achievement badges easily.
🔹 Contributors get recognition in the repository.
🔹 Encourages engagement and participation.