Skip to content

Daily Submodule Update #177

Daily Submodule Update

Daily Submodule Update #177

Workflow file for this run

name: Daily Submodule Update
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-submodules:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout with Submodules
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "github-actions@example.com"
- name: Update Submodules
run: |
git submodule update --remote --merge --recursive
git add .
- name: Commit Changes
id: commit
run: |
if [ -n "$(git status --porcelain)" ]; then
git commit -m "chore: auto-update submodules [skip ci]"
echo "has_commit=true" >> $GITHUB_OUTPUT
else
echo "Pass"
fi
- name: Push Changes
if: steps.commit.outputs.has_commit == 'true'
run: git push origin HEAD:${{ github.ref }}