Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (70 sloc) 2.36 KB
name: Auto update data
on:
schedule:
- cron: '0 0/12 * * *'
jobs:
update-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Use Node.js 10.15.3
uses: actions/setup-node@v1
with:
node-version: "10.15.3"
- name: Fetch data version
run: |
curl -sL https://api.github.com/repos/Kengxxiao/ArknightsGameData/commits |grep -m1 "CN UPDATE" > version/data
- name: npm install, build, and deploy
run: |
if [[`git status --porcelain`]]; then
pip install requests
python ./tools/extractMaterials.py
git config --global user.name "Neko Bot"
git config --global user.email "graueneko@gmail.com"
git remote set-url origin https://x-access-token:$TOKEN@$REPO
git checkout "${GITHUB_REF:11}"
git commit -am "数据更新"
git push
fi
env:
CI: true
TOKEN: ${{ secrets.GH_TOKEN }}
CNAME: aktools.graueneko.xyz
REPO: github.com/graueneko/aktools.git
PROJECT: aktools
update-coding:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Use Node.js 10.15.3
uses: actions/setup-node@v1
with:
node-version: "10.15.3"
- name: Fetch data version
run: curl -sL https://api.github.com/repos/Kengxxiao/ArknightsGameData/commits |grep -m1 "CN UPDATE" > version/data
- name: npm install, build, and deploy
run: |
if [[`git status --porcelain`]]; then
pip install requests
python ./tools/extractMaterials.py
git config --global user.name "Neko Bot"
git config --global user.email "graueneko@gmail.com"
git remote set-url origin https://$TOKEN@$REPO
git checkout "${GITHUB_REF:11}"
git commit -am "数据更新"
git push
fi
env:
CI: true
TOKEN: ${{ secrets.CODING_TOKEN }}
CNAME: aktoolscn.graueneko.xyz
REPO: e.coding.net/graueneko/aktools.git
PROJECT: aktools
You can’t perform that action at this time.