Update GitHub stats #689
This file contains 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 GitHub stats | |
on: | |
schedule: | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: stats | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install HTTPX | |
run: pip install --upgrade httpx | |
- name: Download stats | |
run: python download_stats.py | |
- name: Configure Git for GitHub Actions bot | |
run: | | |
git config --local user.name 'github-actions[bot]' | |
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Commit if stats have changed | |
run: | | |
git add --all && git commit -m "Update stats" && git push |