Skip to content

Update update-submodules.yml #3

Update update-submodules.yml

Update update-submodules.yml #3

name: Update Submodules
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
update-submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.TPA_TOKEN }}
- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Update Submodules
run: |
git submodule update --remote --merge
if [[ $(git status --porcelain) ]]; then
git add .
git commit -m "Update submodules"
git push
else
echo "No changes to commit"
fi