Something went wrong. Try again.
My GitHub profile README — stats, streak, and trophy cards pre-rendered daily by GitHub Actions.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960name: Update README cards
on: schedule: - cron: "0 0 * * *" # Runs once daily at midnight workflow_dispatch:
jobs: build: runs-on: ubuntu-latest
permissions: contents: write
steps: - uses: actions/checkout@v7
- name: Check stats token is configured env: GH_STATS_TOKEN: ${{ secrets.GH_STATS_TOKEN }} run: | if [ -z "$GH_STATS_TOKEN" ]; then echo "::error::GH_STATS_TOKEN is not set. Create a PAT with 'repo' and 'read:user' scopes and add it as a repository secret." exit 1 fi
- name: Generate stats card uses: stats-organization/github-readme-stats-action@v2 with: card: stats options: username=${{ github.repository_owner }}&show_icons=true&locale=en&theme=dracula&count_private=true path: profile/stats.svg token: ${{ secrets.GH_STATS_TOKEN }} fail_on_error: true
- name: Generate top languages card uses: stats-organization/github-readme-stats-action@v2 with: card: top-langs options: username=${{ github.repository_owner }}&layout=compact&langs_count=6 path: profile/top-langs.svg token: ${{ secrets.GH_STATS_TOKEN }} fail_on_error: true
- name: Generate streak card run: | curl -sS --fail --retry 5 --retry-all-errors --retry-delay 5 --max-time 90 \ -o streak.svg \ "https://streak-stats.demolab.com/?user=${{ github.repository_owner }}&theme=dracula" grep -q "<svg" streak.svg mv streak.svg profile/streak.svg
- name: Commit cards run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add profile/*.svg git commit -m "Update README cards" || exit 0 git push