Skip to content

Update Submodules #3524

Update Submodules

Update Submodules #3524

Workflow file for this run

name: Update Submodules
on:
push:
branches:
- main
schedule:
- cron: '0 * * * *' # hourly
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Check for submodule updates
run: |
git submodule update --remote
if [[ $(git status --porcelain) ]]; then
echo "Changes detected in submodules."
git commit -am "Automatically update submodules"
git pull --rebase
git push
else
echo "No changes in submodules."
fi