Track plugin stats #2
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: Track plugin stats | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '17 6 * * 1' | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: track-plugin-stats | |
| cancel-in-progress: false | |
| jobs: | |
| track: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Fetch plugin stats | |
| run: npm run track | |
| - name: Generate graphs | |
| run: npm run graphs | |
| - name: Commit generated files | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add README.md | |
| git add stats.csv | |
| git add generated | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| exit 0 | |
| fi | |
| git commit -m "chore(plugin-stats): update stats for $(date -u +%F)" | |
| git push |