From 70404b51f52aa4f2d52642ecb0453f14926f23e8 Mon Sep 17 00:00:00 2001 From: Dennis Reimann Date: Sat, 31 Aug 2024 14:56:17 +0200 Subject: [PATCH] Add submodule-update action --- .github/workflows/update-submodule.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/update-submodule.yml diff --git a/.github/workflows/update-submodule.yml b/.github/workflows/update-submodule.yml new file mode 100644 index 0000000..7a4a04b --- /dev/null +++ b/.github/workflows/update-submodule.yml @@ -0,0 +1,21 @@ +name: Update submodule + +on: + repository_dispatch: + types: + - update-submodule +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.PAT }} + submodules: recursive + - name: Update module + run: | + git submodule update --init --recursive --checkout -f --remote -- "${{github.event.client_payload.module}}" + git config --global user.name "GitHub Action" + git config --global user.email "noreply@github.com" + git commit -am "deploy: ${{github.event.client_payload.module}} - ${{github.event.client_payload.sha}}" + git push