-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (44 loc) · 1.39 KB
/
autoupdate_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
41
42
43
44
45
name: Autoupdate submodules
on:
workflow_dispatch:
inputs:
name:
description: "Manual trigger"
schedule:
- cron: '0 6 * * *'
jobs:
micro_ros_arduino_generate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- distro: humble
branch: humble
- distro: jazzy
branch: jazzy
- distro: rolling
branch: rolling
steps:
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
fetch-depth: '0'
submodules: recursive
- name: Get date
id: date
run: echo "::set-output name=date::$(date +'%d-%m-%Y %H:%M')"
- name: Update submodules
run: |
git submodule foreach git fetch
git submodule foreach git reset --hard origin/${{ matrix.branch }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: micro-ROS ${{ matrix.distro }} submodule autoupdate ${{ steps.date.outputs.date }}
title: micro-ROS submodule auto-update ${{ steps.date.outputs.date }}
body: This PR is autogenerated and updates submodules. Close and reopen to trigger CI.
branch: autoupdate_micro_ros_submodule_${{ matrix.branch }}
delete-branch: true
reviewers: pablogs9
base: ${{ matrix.branch }}