Skip to content

sync

sync #889

Workflow file for this run

name: sync
on:
push:
branches:
- main
schedule:
- cron: "0 */24 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: update submodule
id: update-submodule
run: |
git submodule update --remote
echo ::set-output name=commit-status::$(git status --porcelain=v1 2>/dev/null | wc -l)
- name: Commit files
if: ${{ steps.update-submodule.outputs.commit-status==1 }}
id: commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git add .
git commit -m "sync submodule" -a
- name: Push changes
id: push
if: ${{ steps.update-submodule.outputs.commit-status==1 }}
uses: ad-m/github-push-action@master
with:
force_with_lease: true