🐎 ci(update-source.yml): fix workflows
move `update-source.yml` to main branch cause schedule trigger only avalible on main branchpull/84/head
parent
8535c11479
commit
5d9c1f0ea2
|
|
@ -0,0 +1,41 @@
|
|||
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
|
||||
Loading…
Reference in New Issue