This repository uses GitHub Actions to automatically update the README with fresh GitHub statistics daily.
- Daily Schedule: The workflow runs every day at 00:00 UTC (5:30 AM IST)
- Fetches Stats: Uses GitHub API to get your latest stats (repos, stars, forks, followers, top languages)
- Updates README: Automatically updates the
### 📊 GitHub Statssection - Commits Changes: Pushes the updated README back to the repository
.github/workflows/update-stats.yml- GitHub Actions workflow configuration.github/scripts/update_stats.py- Python script that fetches and formats stats
First, commit and push all the files to your GitHub repository:
git add .
git commit -m "Add GitHub stats auto-update workflow"
git push origin main- Go to your repository on GitHub
- Click on the Actions tab
- If prompted, click "I understand my workflows, go ahead and enable them"
To test the workflow immediately without waiting for the daily schedule:
- Go to Actions tab in your repository
- Click on "Update GitHub Stats" workflow
- Click "Run workflow" button
- Select the branch (usually
main) - Click "Run workflow"
The workflow will run and update your README within a minute!
Edit .github/workflows/update-stats.yml and modify the cron schedule:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
# Examples:
# - cron: '0 */12 * * *' # Every 12 hours
# - cron: '0 0 * * 1' # Every MondayEdit .github/scripts/update_stats.py to customize:
- Which stats to display
- Formatting and styling
- Number of top languages shown (currently 5)
- 📦 Public Repositories count
- ⭐ Total Stars Earned
- 🍴 Total Forks
- 👥 Followers count
- 📝 Public Gists count
- 🔥 Top 5 Programming Languages
- 🕐 Last updated timestamp
- Check if GitHub Actions is enabled in your repository settings
- Verify the workflow file is in
.github/workflows/directory - Check the Actions tab for any error messages
- Go to Actions tab and check the latest workflow run
- Click on the failed run to see error logs
- Ensure the Python script has correct permissions
- The workflow uses
GITHUB_TOKENwhich is automatically provided by GitHub Actions - No additional secrets or tokens need to be configured
- The commit message includes
[skip ci]to prevent infinite workflow loops - Stats are fetched only from public repositories
Your GitHub stats will now update automatically every day! 🚀