Skip to content

Merge pull request #12 from nsarlin-zama/rebase_version_on_main #7

Merge pull request #12 from nsarlin-zama/rebase_version_on_main

Merge pull request #12 from nsarlin-zama/rebase_version_on_main #7

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 hello
echo "DATA_LATEST_VERSION=\
$(git for-each-ref --format='%(refname:short)' refs/remotes/origin \
| grep -Po '(?<=origin/)v\d.\d(.\d)?$' \
| sort -V | tail -n 1\
)" >> $GITHUB_ENV
- name: Rebase and push
run: |
git switch $DATA_LATEST_VERSION
git rebase main
git push --force-with-lease