Update merger.yml #20
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: Update Branches | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
branches: | |
- tf/actions/autorebase | |
workflow_dispatch: | |
jobs: | |
update-branches: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: [main, tf/SHT4x, tf/s35770] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Git | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email 'github-actions@github.com' | |
- name: Add upstream remote | |
run: git remote add upstream https://github.com/PX4/PX4-Autopilot.git | |
- name: Fetch all branches | |
run: git fetch --all | |
- name: Checkout and rebase branch | |
run: | | |
git checkout ${{ matrix.branch }} | |
git rebase upstream/main | |
git push origin ${{ matrix.branch }} --force |