Update Git Submodule #141
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 Git Submodule | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' # 每天 UTC 时间 2 点执行 | |
| workflow_dispatch: # 手动触发 | |
| jobs: | |
| update-submodule: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository (with submodules) | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update date | |
| run: | | |
| npm i pnpm -g | |
| pnpm -v | |
| pnpm i | |
| npx puppeteer browsers install chrome | |
| npm run auto | |
| - name: Commit submodule updates | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git commit -m "chore: update submodules to latest" || echo "No changes to commit" | |
| - name: Push changes | |
| run: | | |
| git push |