Skip to content

feat: initial commit #15

feat: initial commit

feat: initial commit #15

name: Update Submodules
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1' # run every Monday at 6AM UTC
push:
jobs:
update-submodules:
runs-on: self-hosted
steps:
- name: Checkout repository (with submodules)
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Update submodules
run: |
git submodule update --remote --merge --recursive
- name: Check for submodule changes
run: |
if ! git diff --quiet; then
echo "Submodule changes detected."
echo "changes=true" >> $GITHUB_ENV
else
echo "No submodule changes detected."
fi
- name: Commit and push updates
if: env.changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add projects/*
git commit -m "chore(submodules): update [skip ci]"
git push origin HEAD:main