Skip to content

Sync Submodules

Sync Submodules #543

on:
schedule:
# Run everyday at 11:00 UTC
- cron: '0 11 * * *'
# Allows you to run this workflow manually from the Actions tab or through HTTP API
workflow_dispatch:
name: Sync Submodules
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Git submodule update
run: |
git submodule update --init --recursive --remote
- name: Commit update
run: |
git config --global user.name 'Git bot'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "submodules: Updated references" && git push || echo "No changes to commit"