Merge pull request #42 from UMLCloudComputing/autosubmoduleupdate #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fetch Submodules | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs every day at midnight | |
push: | |
branches: | |
- main # Triggers on push to main branch | |
jobs: | |
fetch-submodules: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: true # Fetches submodules | |
- name: Run submodule update script | |
run: ./submodule-update.sh | |
- name: Configure Git | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Commit and push changes | |
run: | | |
git add . | |
git diff-index --quiet HEAD || git commit -m "Update submodules" && git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |