Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Update Submodules #4390

Update Submodules

Update Submodules #4390

name: Update Submodules
on:
schedule:
# run daily at midnight
- cron: '0 * * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Initialize or update each one recursively
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
# Commit to the repo under the GitHub actions user to ensure we have
# reasonable logging to trace back
- name: Commit & push changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions - update submodules"
git commit -am "Update submodules" || echo "No changes to commit"
git push