Repository navigation
Refresh profile stats #77
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: Refresh profile stats | |
| on: | |
| schedule: | |
| - cron: '17 5 * * *' | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| refresh: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - run: pip install requests lxml python-dateutil | |
| - run: python today.py | |
| env: | |
| # Optional: set an ACCESS_TOKEN repo secret (classic PAT with repo + read:user) | |
| # to count private contributions. Falls back to the built-in token otherwise. | |
| ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN || secrets.GITHUB_TOKEN }} | |
| USER_NAME: hugomn | |
| - run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add dark_mode.svg light_mode.svg | |
| git diff --staged --quiet || (git commit -m "chore: refresh profile stats" && git push) |