update_submodule #60
This file contains 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 Submodules | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [update_submodule] | |
jobs: | |
update-submodule: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Submodule | |
uses: actions/checkout@v4.1.7 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN }} | |
submodules: recursive | |
- name: Commit update | |
run: | | |
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | |
git config --local user.name 'github-actions[bot]' | |
git submodule update --remote | |
git add . | |
git commit -m "Update submodule: `TZ='Asia/Shanghai' date +'%Y-%m-%d %H:%M:%S'`" | |
git push origin master |