Track plugin installs #1
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 installs | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '17 6 * * 1' | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: track-plugin-installs | |
| 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 tracker dependencies | |
| working-directory: plugin-install-tracker | |
| run: npm ci | |
| - name: Fetch plugin stats | |
| run: node plugin-install-tracker/track-plugin-installs.mjs | |
| - name: Generate graphs | |
| run: node plugin-install-tracker/generate-graphs.mjs | |
| - 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 plugin-install-tracker/stats.csv | |
| git add plugin-install-tracker/generated | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit" | |
| exit 0 | |
| fi | |
| git commit -m "Plugin stats: $(date -u +%F)" | |
| git push |