From b243f594845f3cbe65be822123c794ff7960db1c Mon Sep 17 00:00:00 2001 From: Nicolas Sarlin Date: Tue, 8 Oct 2024 11:59:43 +0200 Subject: [PATCH] final one ? --- .github/workflows/on_merge.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/on_merge.yml b/.github/workflows/on_merge.yml index da078e0..d2a3370 100644 --- a/.github/workflows/on_merge.yml +++ b/.github/workflows/on_merge.yml @@ -17,10 +17,8 @@ jobs: - name: Get branch for the latest version run: | echo hello - git fetch --all - echo $(git for-each-ref --format='%(refname:short)' refs/remotes/origin) - echo $(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -Po '(?<=origin/)v\d.\d(.\d)?$') - echo "DATA_LATEST_VERSION=$(git for-each-ref --format='%(refname:short)' refs/remotes/origin \ + 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 @@ -28,5 +26,5 @@ jobs: - name: Rebase and push run: | git switch $DATA_LATEST_VERSION - git rebase master + git rebase main git push --force-with-lease