Update Stats Badges #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Stats Badges | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 0 * * *' # Run daily at midnight | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-stats-badges: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Fetch GitHub Stats | |
| id: stats | |
| run: python3 .github/scripts/fetch_stats.py | |
| - name: Create Version Badge | |
| uses: emibcn/badge-action@v2.0.2 | |
| with: | |
| label: 'Version' | |
| status: '${{ steps.stats.outputs.version }}' | |
| color: '7C4DFF' | |
| path: '.github/badges/version.svg' | |
| - name: Create Downloads Badge | |
| uses: emibcn/badge-action@v2.0.2 | |
| with: | |
| label: 'Downloads' | |
| status: '${{ steps.stats.outputs.downloads }}' | |
| color: '7C4DFF' | |
| path: '.github/badges/downloads.svg' | |
| - name: Create Stars Badge | |
| uses: emibcn/badge-action@v2.0.2 | |
| with: | |
| label: 'Stars' | |
| status: '${{ steps.stats.outputs.stars }}' | |
| color: '7C4DFF' | |
| path: '.github/badges/stars.svg' | |
| - name: Commit and Push Badges | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: auto-update stats badges" | |
| file_pattern: ".github/badges/version.svg .github/badges/downloads.svg .github/badges/stars.svg" |