name: Update Submodules on: repository_dispatch: types: [version-push] concurrency: group: ${{github.workflow}} cancel-in-progress: true jobs: update-submodule: name: Update Submodules runs-on: ubuntu-latest permissions: actions: write contents: write steps: - name: Print Dispatch Info run: | echo "Actor: ${{github.event.client_payload.actor}}" echo "Head Ref: ${{github.event.client_payload.head_ref}}" echo "Head Sha: ${{github.event.client_payload.head_sha}}" echo "Base Ref: ${{github.event.client_payload.base_ref}}" - name: Checkout Main uses: actions/checkout@v4 with: ref: main fetch-depth: 0 submodules: recursive - name: Update Submodules run: | git submodule update --init --recursive git submodule update --recursive --remote - name: Commit Changes id: commit run: | git config user.name github-actions[bot] git config user.email 41898282+github-actions[bot]@users.noreply.github.com git add --all git commit -m "Update submodules" --author="${{github.event.client_payload.actor}} <${{github.event.client_payload.actor}}@users.noreply.github.com>" || : - name: Push Changes run: | git push