From 37b77f7167783207a1bbfbe51f303a218e6aaaf7 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Sat, 13 Jan 2024 02:56:58 -0800 Subject: [PATCH] ci: Add update submodule --- .github/workflows/update_submodules.yml | 39 +++++++++++++++++++++++++ 1 file changed, 39 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..dc80f5a4 --- /dev/null +++ b/.github/workflows/update_submodules.yml @@ -0,0 +1,39 @@ +name: Update Submodules + +on: + schedule: + - cron: '0 * * * *' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Set git config + run: | + git config user.name github-actions + git config user.email github-actions@github.com + + - name: Submodule update + run: | + git submodule init + git submodule update --remote --merge + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.PAT }} + title: 'Update submodules' + body: '' + commit-message: 'Update all submodules' + branch: submodules-update + delete-branch: true