From af93c64cfb29694764c386593de03a4aca9d7a14 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sat, 26 Feb 2022 04:36:20 -0500 Subject: [PATCH] Create submodule-sync.yml --- .github/workflows/submodule-sync.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/submodule-sync.yml diff --git a/.github/workflows/submodule-sync.yml b/.github/workflows/submodule-sync.yml new file mode 100644 index 00000000..52384cce --- /dev/null +++ b/.github/workflows/submodule-sync.yml @@ -0,0 +1,40 @@ +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 }}