Skip to content

Update

Update #86

Workflow file for this run

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 }}