From ef6f5bb252100921c158ca4b0c2f63d70da3d200 Mon Sep 17 00:00:00 2001 From: Thomas Burton Date: Wed, 7 Feb 2024 17:35:14 +0100 Subject: [PATCH] [pick] --- .github/workflows/ci-cherry-pick.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-cherry-pick.yml b/.github/workflows/ci-cherry-pick.yml index 1daa137577..e29f56dff9 100644 --- a/.github/workflows/ci-cherry-pick.yml +++ b/.github/workflows/ci-cherry-pick.yml @@ -22,10 +22,13 @@ jobs: - name: Cherry-pick commit run: | + RELEASE_BRANCH=$(git branch -r | grep 'origin/release/[0-9]\+\.[0-9]' | sed 's/.*release\///' | sort -V | tail -n1) + echo "RELEASE_BRANCH=release/$RELEASE_BRANCH" >> $GITHUB_ENV BRANCH=pick/non-breaking-$(date +%s) echo "BRANCH=$BRANCH" >> $GITHUB_ENV COMMIT_SHA=$(git rev-parse HEAD) - echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV + + git checkout $RELEASE_BRANCH git checkout -b $BRANCH git cherry-pick -x $COMMIT_SHA @@ -33,12 +36,6 @@ jobs: run: | git push origin ${{ env.BRANCH }} - - name: Find latest release branch - run: | - RELEASE_BRANCH=$(git branch -r | grep 'origin/release/[0-9]\+\.[0-9]' | sed 's/.*release\///' | sort -V | tail -n1) - echo "RELEASE_BRANCH=release/$RELEASE_BRANCH" >> $GITHUB_ENV - -#2 - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: