Update #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update | |
on: | |
schedule: | |
- cron: '0 17 */7 * *' | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
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/SteamDatabase/GameTracking-CSGO/raw/master/csgo/scripts/items/items_game.txt | |
wget https://github.com/SteamDatabase/GameTracking-CSGO/raw/master/csgo/resource/csgo_schinese.txt | |
wget https://github.com/SteamDatabase/GameTracking-CSGO/raw/master/csgo/resource/csgo_english.txt | |
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.txt | |
rm csgo_schinese.txt | |
rm csgo_english.txt | |
- 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_schinese.json | |
wget https://github.com/dotabuff/d2vpkr/raw/master/dota/resource/localization/items_english.json | |
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_schinese.json | |
rm items_english.json | |
- 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 }} |