on: workflow_dispatch: jobs: sync: name: Submodule Sync runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 submodules: recursive - name: Git Sumbodule Update run: | git pull --recurse-submodules git submodule update --remote --recursive - name: Verify Changed files uses: tj-actions/verify-changed-files@v8.8 id: verify-changed-files with: files: | tests/demo - name: Commit changes if: steps.verify-changed-files.outputs.files_changed == 'true' run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" git add ${{ steps.verify-changed-files.outputs.changed_files }} git commit -m "Updated submodule." - name: Push changes if: steps.verify-changed-files.outputs.files_changed == 'true' uses: ad-m/github-push-action@master with: github_token: ${{ secrets.PAT_TOKEN }}