Skip to content

Merge pull request #6 from nsarlin-zama/rebase_version_on_main #1

Merge pull request #6 from nsarlin-zama/rebase_version_on_main

Merge pull request #6 from nsarlin-zama/rebase_version_on_main #1

Workflow file for this run

name: Auto rebase the latest version branch with main
on:
push:
branches:
- main
jobs:
synchronise_version_branch:
name: Synchronize the latest branch
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get branch for the latest version
run: echo "DATA_LATEST_VERSION=$(git for-each-ref --format='%(refname:short)' refs/heads | grep -Po '^v\d.\d(.\d)?$' | sort -V | tail -n 1)" >> $GITHUB_ENV
- name: Rebase and push
run: |
git switch $DATA_LATEST_VERSION
git rebase master
git push --force-with-lease