From 8df6a3d16c0b2812785b5933176c1586408d126b Mon Sep 17 00:00:00 2001 From: PJ568 Date: Thu, 8 Aug 2024 17:16:53 +0800 Subject: [PATCH] Create Update_Submodules.yml --- .github/workflows/Update_Submodules.yml | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/Update_Submodules.yml diff --git a/.github/workflows/Update_Submodules.yml b/.github/workflows/Update_Submodules.yml new file mode 100644 index 00000000..aff90677 --- /dev/null +++ b/.github/workflows/Update_Submodules.yml @@ -0,0 +1,32 @@ +name: Update Submodules + +on: + workflow_dispatch: + +jobs: + update-submodules: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + submodules: true + fetch-depth: 0 + + - name: Update Submodules + run: | + git submodule update --remote --merge + + - name: Commit changes + run: | + git config user.name "GitHub Actions" + git config user.email "actions@example.com" + git add . + git commit -m "Update submodules" || echo "No changes to commit" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: main