Skip to content

Commit

Permalink
Merge pull request #6 from nsarlin-zama/rebase_version_on_main
Browse files Browse the repository at this point in the history
auto rebase latest version on main
  • Loading branch information
nsarlin-zama authored Oct 8, 2024
2 parents 1766463 + 4fe5a8c commit b9cbbb9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/on_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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

0 comments on commit b9cbbb9

Please sign in to comment.