mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 23:27:09 +00:00
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
name: Update Locales
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 3 * * *'
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Fetch changes from Tabula
|
|
run: |
|
|
curl "https://tabulas.herokuapp.com/api/loot-table/en/" | python -m json.tool --sort-keys > "locales/en.json"
|
|
curl "https://tabulas.herokuapp.com/api/loot-table/ru/" | python -m json.tool --sort-keys > "locales/en.json"
|
|
curl "https://tabulas.herokuapp.com/api/loot-table/zh-CN/" | python -m json.tool --sort-keys > "locales/zh-CN.json"
|
|
- name: Commit changes
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add -A
|
|
git commit -m "Update locales"
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
author-name: Github Action
|
|
author-email: action@github.com
|
|
title: Update locales
|