Skip to content

rebase-ros-rmw_fastrtps #791

rebase-ros-rmw_fastrtps

rebase-ros-rmw_fastrtps #791

name: rebase-ros-rmw_fastrtps
on:
schedule:
- cron: '0 0 * * *'
# scheduled every midnight
workflow_dispatch:
#manual run of the workflow job
jobs:
rebase-branches:
name: Rebase HEAD with upstream current branch
runs-on: ubuntu-latest
strategy:
matrix:
dest_branch: ['master', 'humble', 'iron', 'vulcanexus', 'vulcanexus-humble', 'vulcanexus-iron']
steps:
# Step 1: run a standard checkout action, provided by github (REQUIRED)
- name: Checkout target repo
uses: actions/checkout@v2
with:
ref: ${{ matrix.dest_branch }}
fetch-depth: 0
# Step 2: Set git config and add remote (REQUIRED)
- name: Set git config and add remote
id: config
run: |
git config --local user.email "ricardogonzalez@eprosima.com"
git config --local user.name "richiprosima"
git remote add ros https://github.com/ros2/rmw_fastrtps.git
shell: bash
# Step 3: Rebase
- name: Rebase current branch to upstream changes
id: rebase_master
run: |
git fetch ros ${{ matrix.dest_branch }}
git rebase ros/${{ matrix.dest_branch }}
shell: bash
if: matrix.dest_branch == 'master' || matrix.dest_branch == 'humble' || matrix.dest_branch == 'iron'
- id: rebase_vulcanexus
run: |
git fetch ros master
git rebase ros/master
shell: bash
if: matrix.dest_branch == 'vulcanexus'
- id: rebase_vulcanexus_humble
run: |
git fetch ros humble
git rebase ros/humble
shell: bash
if: matrix.dest_branch == 'vulcanexus-humble'
- id: rebase_vulcanexus_iron
run: |
git fetch ros iron
git rebase ros/iron
shell: bash
if: matrix.dest_branch == 'vulcanexus-iron'
# Step 4: Push
- name: Force push if required
id: push
run: |
if [ "$(git status | grep 'diverged\|ahead')" ]; then
git push -f
fi;
shell: bash