This repository was archived by the owner on Feb 18, 2026. It is now read-only.
Submodule Update #52
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: Submodule Update | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' # 每日凌晨3点执行 | |
| workflow_dispatch: # 允许手动触发 | |
| permissions: | |
| contents: write # 显式授予写入权限 | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| fetch-depth: 0 | |
| # 使用自动生成的令牌 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update submodules | |
| run: | | |
| git submodule update --recursive --remote | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "Auto-update submodules" || echo "No changes to commit" | |
| git push |