Skip to content

Sync Submodules

Sync Submodules #883

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"