Fix 2.0.1 #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Update submodule to latest" | |
| on: | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-submodule: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Config user | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Update submodule | |
| run: | | |
| git submodule set-branch --branch main include | |
| git submodule update --init --remote include | |
| git add include | |
| if ! git diff --staged --quiet; then | |
| git commit -m "[skip ci] update include submodule to latest main" | |
| git push origin HEAD:${{github.head_ref}} | |
| else | |
| echo "No update required" | |
| fi |