Sync Submodules #883
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: 'Sync Submodules' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
sync-submodules: | |
name: 'Sync submodules' | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.NALSAIBOT_TOKEN }} | |
submodules: true | |
- name: Update submodules | |
run: | | |
git pull --recurse-submodules | |
git submodule update --remote --recursive | |
- name: Commit update | |
run: | | |
git config --global user.name 'NalsaiBot' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.NALSAIBOT_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "Update submodules" && git push || echo "No changes to commit" |