42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Update translation source
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 1,13 * * *"
|
|
|
|
jobs:
|
|
update-source-and-progress:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repository content
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: translations
|
|
|
|
- name: download folder from stable-diffusion-webui-localization-source
|
|
run: |
|
|
mkdir -p temp/source
|
|
curl -sSL https://github.com/harukaxxxx/stable-diffusion-webui-localization-source/archive/refs/heads/main.tar.gz | tar -xz --strip-components=2 -C temp/source stable-diffusion-webui-localization-source-main/source
|
|
|
|
- name: copy and overwrite source files
|
|
run: |
|
|
mkdir -p template/source
|
|
cp -rf temp/source/* template/source
|
|
|
|
- name: configure git
|
|
run: |
|
|
git config --local user.name "github-actions[bot]"
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: commit changes
|
|
run: |
|
|
git add template
|
|
git diff-index --quiet HEAD || (git commit -a -m "✨ feat: update translation source" --allow-empty)
|
|
|
|
- name: push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: translations
|