stable-diffusion-webui-loca.../.github/workflows/Merge.yaml

75 lines
2.1 KiB
YAML

name: Merge i18n/l10n & Update README📃
on:
workflow_dispatch:
pull_request:
branches:
- main
types:
- closed
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: pip install -r './tools/requirements.txt'
- name: merge translation
run: python './tools/merge.py'
- name: commit files
run: |
if git diff-index --quiet HEAD --; then
echo "No changes detected"
exit 0
else
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "Merge i18n/l10n"
fi
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
progress_update:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- 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: |
if git diff-index --quiet HEAD --; then
echo "No changes detected"
exit 0
else
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "Update Progress📃"
fi
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main