Update Stats #453
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 | |
| on: | |
| schedule: | |
| - cron: '31 8 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-stats: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: pip install -r plugin_stats_deps.txt | |
| - name: Run plugin_stats.py | |
| run: python plugin_stats.py | |
| env: | |
| STATS_TOKEN: ${{ secrets.STATS_TOKEN }} | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'Stats Bot' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add repo_stats.csv | |
| git commit -m "Update repo_stats.csv" | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |