-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.04 KB
/
update.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
38
39
40
41
42
43
44
name: update
on:
schedule:
- cron: '0 15 * * *'
jobs:
download:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: './package-lock.json'
- name: git fetch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout main
git fetch
git pull origin main
- name: update
run: node scripts/update.js
- name: commit database.json
run: |
git add .
git commit -m 'update database.json'
- name: make history
run: node scripts/history.js
- name: commit history
run: |
git add .
git commit -m 'update history'
git push 'https://${{ secrets.GITHUB_TOKEN }}@github.com/taikowiki/taiko-song-database'