-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.11 KB
/
update-download-history.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
45
46
47
name: Update download history
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
jobs:
update:
runs-on: windows-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
with:
path: download-extractor
- name: Checkout mod database
uses: actions/checkout@v3
with:
repository: Raicuparta/ow-mod-db
ref: master
fetch-depth: 0
path: ow-mod-db
- name: Get database log
run: |
cd ow-mod-db
git log -p > log.txt
cd ..
- name: Convert log.txt to json
run: |
cd download-extractor
./bin/Debug/net6.0/OWModDBDownloadCountExtractor.exe "../ow-mod-db/log.txt" > download-history.json
cd ..
- name: Commit log json
run: |
cd download-extractor
git config --global user.email "GH Action"
git config --global user.name "[email protected]"
git add download-history.json
git commit -m "Update download history"
git push