Skip to content

Update Submodules

Update Submodules #155

Workflow file for this run

name: Update Submodules
on:
push:
branches: [ main ]
schedule:
- cron: "45 10 * * *"
workflow_dispatch:
jobs:
update_submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.PAT }} # 使用个人访问令牌
- name: Update submodules
run: |
git submodule update --remote
- name: Commit changes
run: |
if git diff --exit-code; then
echo "No submodule updates detected."
else
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update submodules"
git push
fi