Skip to content

Update submodules

Update submodules #124

Workflow file for this run

name: Update submodules
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Update submodules
run: |
git config --file .gitmodules --get-regexp branch | while read -r line; do
submodule=$(echo $line | awk '{print $1}' | sed 's/branch.//'| cut -d'.' -f2)
branch=$(echo $line | awk '{print $2}')
echo "Updating submodule $submodule to branch $branch"
cd $submodule
git checkout $branch
git pull origin $branch
cd ..
done
- name: Push
run: |
git config user.name "oSoWoSo[bot]"
git config user.email "mail@osowoso.org"
#git submodule sync --quiet --recursive
#git submodule update --init --recursive
git add --all
git commit -m "sync" || echo "No changes to commit"
git push