rebase-3.0.x-devel-master #91
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rebase-3.0.x-devel-master | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
# scheduled every midnight | |
workflow_dispatch: | |
#manual run of the workflow job | |
jobs: | |
rebase-branches: | |
name: Rebase 3.0.x-devel branch HEAD with master current branch | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: checkout action | |
- name: Checkout target repo | |
uses: eProsima/eProsima-CI/external/checkout@v0 | |
with: | |
ref: 3.0.x-devel | |
fetch-depth: 0 | |
persist-credentials: true | |
# Step 2: Set git config | |
- name: Set git config | |
id: config | |
run: | | |
git config --local user.email "ricardogonzalez@eprosima.com" | |
git config --local user.name "richiprosima" | |
shell: bash | |
# Step 3: Rebase | |
- name: Rebase current branch | |
id: rebase_master | |
run: | | |
git fetch origin master | |
git rebase origin/master | |
shell: bash | |
# Step 4: Push | |
- name: Force push if required | |
id: push | |
run: | | |
if [ "$(git status | grep 'diverged\|ahead')" ]; then | |
git push -f | |
fi; | |
shell: bash |