46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Update progress
|
|
run-name: Updating each file's traslate progress into README.md
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types:
|
|
- closed
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repository content
|
|
uses: actions/checkout@v3
|
|
|
|
- name: setup python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10.6"
|
|
|
|
- name: install python dependencies
|
|
uses: py-actions/py-dependency-install@v4
|
|
with:
|
|
path: "./tools/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
|