This repository was archived by the owner on Dec 31, 2025. It is now read-only.
Daily Submodule Update #88
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: Daily Submodule Update | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-submodules: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| # Don't initialize submodules here | |
| - name: Initialize and update submodules | |
| run: | | |
| git submodule sync --recursive | |
| git submodule update --init --remote --recursive | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "No changes to commit" | |
| echo "has_changes=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Changes detected" | |
| echo "has_changes=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push changes | |
| if: steps.check_changes.outputs.has_changes == 'true' | |
| run: | | |
| DATE=$(date +%Y-%m-%d) | |
| git config --global user.name 'GitHub Actions' | |
| git config --global user.email 'actions@github.com' | |
| git add . | |
| git commit -m "Update submodules - $DATE" | |
| git push |