From 37fdcf6113d43d770ef3014ebb25d95e5cedc9a1 Mon Sep 17 00:00:00 2001 From: fan-ziqi Date: Wed, 6 Mar 2024 17:49:50 +0800 Subject: [PATCH] feat: add auto update --- .github/workflows/update.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/update.yml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..d5c45a5 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,28 @@ +name: Send submodule updates to parent repo + +on: + push: + branches: + - BlindDog + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + repository: fan-ziqi/BlindDog + token: ${{ secrets.PRIVATE_TOKEN_GITHUB }} + + - name: Pull & update submodules recursively + run: | + git submodule update --init --recursive + git submodule update --recursive --remote + - name: Commit + run: | + git config user.email "actions@github.com" + git config user.name "GitHub Actions - update submodules" + git add --all + git commit -m "Update submodules" || echo "No changes to commit" + git push