-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (56 loc) · 1.92 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Update
on:
schedule:
- cron: '0 17 */7 * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests vdf
- name: Processing CSGO
env:
APIKEY: ${{ secrets.APIKEY }}
run: |
wget https://github.com/ByMykel/counter-strike-file-tracker/raw/main/static/items_game.json
wget https://github.com/ByMykel/counter-strike-file-tracker/raw/main/static/csgo_schinese.json
wget https://github.com/ByMykel/counter-strike-file-tracker/raw/main/static/csgo_english.json
python csgoschema.py $APIKEY
cp ./schema_zh-CN.json ./dist/csgo/
cp ./schema_en-US.json ./dist/csgo/
rm ./schema_zh-CN.json
rm ./schema_en-US.json
rm items_game.json
rm csgo_schinese.json
rm csgo_english.json
- name: Processing Dota2
env:
APIKEY: ${{ secrets.APIKEY }}
run: |
wget https://github.com/dotabuff/d2vpkr/raw/master/dota/scripts/items/items_game.txt
wget https://github.com/dotabuff/d2vpkr/raw/master/dota/resource/localization/items_english.txt
python dota2schema.py $APIKEY
cp ./schema_zh-CN.json ./dist/dota2/
cp ./schema_en-US.json ./dist/dota2/
rm ./schema_zh-CN.json
rm ./schema_en-US.json
rm items_game.txt
rm items_english.txt
- name: Get time
run: |
echo "CMsg=Updated: $(date +'%Y-%m-%d %H:%M:%S %z')" >> $GITHUB_ENV
- name: Push
uses: Smart-Transportation/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
message: ${{ env.CMsg }}