forked from PX4/PX4-Autopilot
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.2 KB
/
update_submodules.yml
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
34
35
36
37
38
39
40
# This workflow updates some or all submodules to their latest remote commit on the target branch of this repo
name: Update submodules to latest
on:
schedule:
- cron: '0 1 */1 * *' # every day at 01:00
workflow_dispatch: # on button click
jobs:
Update_submodules:
runs-on: ubuntu-latest
name: Update submodules to latest
steps:
- uses: actions/checkout@v2
with:
ref: stable #target branch
#submodules: 'recursive' # possibly needed in your situation
- name: Update
run: |
set -x
git config --global user.name 'Actions Bot'
git config --global user.email '<>'
#update all submodules
#git submodule update --recursive --remote --init
#update only individual submodules
git submodule update --remote --init Tools/sitl_gazebo
git add Tools/sitl_gazebo
if [[ `git status --porcelain --untracked-files=no` ]]; then
# Changes to commit
git commit -m "Update submodules to latest"
#push changes
git push
else
echo "no changes to commit"
fi