39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Download and push folder to repository
|
|
on:
|
|
schedule:
|
|
- cron: '0 0,12 * * *'
|
|
push:
|
|
branches: [main]
|
|
jobs:
|
|
download_and_push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Download folder from external repository
|
|
run: |
|
|
mkdir -p temp/source
|
|
curl -sSL https://github.com/benlisquare/stable-diffusion-webui-localization-zh_TW/archive/refs/heads/main.tar.gz | tar -xz --strip-components=3 -C temp/source stable-diffusion-webui-localization-zh_TW-main/json/source
|
|
|
|
- name: Copy and overwrite files
|
|
run: |
|
|
mkdir -p template
|
|
cp -rf temp/source/* template
|
|
|
|
- name: Configure git
|
|
run: |
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
|
|
- name: Commit changes
|
|
run: |
|
|
git add template
|
|
git commit -m "Update localization files"
|
|
|
|
- name: Push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
branch: main
|