Skip to content

Update User Count & Total XP #30

Update User Count & Total XP

Update User Count & Total XP #30

Workflow file for this run

name: Update User Count & Total XP
on:
schedule:
- cron: '0 0 1,15 * *' # 1st and 15th of each month
workflow_dispatch: # Manual trigger
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install mongodb --no-save mongodb
- name: Update README with user count
run: node .github/workflows/getUserCount.js
env:
MONGODB_URI: ${{ secrets.MONGODB_URI }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: 'Analytics: Update User Count & Total XP'
branch: 'analytics/user-count'
delete-branch: true
commit-message: 'Update user count and xp in README'
body: |
Automated user count & Total XP update
- Updates badge in README with current user count & total xp