-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1 KB
/
submodules.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Update Submodules
on:
push:
branches: [ main ]
repository_dispatch:
types: [ update_submodules ]
workflow_dispatch:
jobs:
update_submodules:
name: Update Submodules
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: true
- name: Update Submodules
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit and Push changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions - Update Submodules"
git pull origin main
git add --all
git commit -m "Update submodules" || echo "No changes to commit"
git push