Skip to content

Weekly Update Submodules #734

Weekly Update Submodules

Weekly Update Submodules #734

name: Weekly Update Submodules
on:
push:
branches:
- main
workflow_dispatch:
schedule:
# 7am everyday
- cron: '0 7 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTIONS_SECRET }}
submodules: true
# Update references
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Commit update
run: |
git config --global user.name 'Git bot'
git config --global user.email '[email protected]'
git remote set-url origin https://${{ env.GITHUB_REPOSITORY_OWNER }}:${{ secrets.ACTIONS_SECRET }}@github.com/${{ github.repository }}
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"