Auto Update Submodules #40
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: Auto Update Submodules | |
| on: | |
| schedule: | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-modules: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| ref: main | |
| - name: Setup Git User | |
| run: | | |
| git config --global user.name 'FarmInsight Bot' | |
| git config --global user.email 'bot@noreply.github.com' | |
| - name: Update Submodules | |
| run: | | |
| git submodule update --remote --recursive | |
| - name: Commit and Push if changed | |
| run: | | |
| git add . | |
| git commit -m "Auto-update: Sync modules to latest dev" || echo "No changes to commit" | |
| git push origin main |