44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Merge i18n
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types:
|
|
- closed
|
|
|
|
jobs:
|
|
merge:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repo content
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: Katsuyuki-Karasawa/sd.webui-i18n-source
|
|
path: template
|
|
token: ${{ secrets.OTHER_REPO_TOKEN }}
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- 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 |