43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Update progress
|
|
run-name: Updating each file's traslate progress into README.md
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
|
|
jobs:
|
|
buid:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repository content
|
|
uses: actions/checkout@v3
|
|
|
|
- name: setup python
|
|
uses: actions/setup-python@v4.5.0
|
|
with:
|
|
python-version: "3.10.6"
|
|
|
|
- name: install python dependencies
|
|
uses: py-actions/py-dependency-install@v4
|
|
with:
|
|
path: "./requirements.txt"
|
|
|
|
- name: run crowdin tool.py
|
|
env:
|
|
crowdin_api_token : ${{ secrets.CROWDIN_PROGRESS_CHECKER_API_KEY }}
|
|
run: python 'tools/crowdin tool.py'
|
|
|
|
- name: commit files
|
|
run: |
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
git add -A
|
|
git diff-index --quiet HEAD || (git commit -a -m "📃 docs(README.md): update translate progress in README.md" --allow-empty)
|
|
|
|
- name: push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: main
|