name: Download and push folder to repository on: schedule: - cron: '0 0 * * *' 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/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 files run: | mkdir -p template cp -rf temp/source/* template/source - 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