-
-
Notifications
You must be signed in to change notification settings - Fork 10
37 lines (30 loc) · 1.04 KB
/
update-users.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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