-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (40 loc) · 1.21 KB
/
Copy pathupdate-data.yml
File metadata and controls
47 lines (40 loc) · 1.21 KB
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
38
39
40
41
42
43
44
45
46
47
name: Update Dashboard Data
on:
workflow_dispatch:
schedule:
# Every 6 hours (UTC)
- cron: "0 */6 * * *"
# Monday 6:40–7:10 UTC: every 10 minutes (6:40, 6:50, 7:00, 7:10)
- cron: "40,50 6 * * 1"
- cron: "0,10 7 * * 1"
jobs:
update-data:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run analytics script
run: |
yarn analyze-auto-voting \
--checkpoint public/data/report.json \
--output public/data/report.json
- name: Commit and push if report changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add public/data/report.json
if git diff --staged --quiet; then
echo "No changes to report.json"
else
git commit -m "chore: update auto-voting report [skip ci]"
git push
fi