Skip to content

Commit

Permalink
More spring-cherry-pick.yml fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Feb 8, 2024
1 parent bb87f33 commit 7d7aecd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/spring-cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ jobs:
run: |
git config --global user.name 'Spring Builds'
git config --global user.email '[email protected]'
cherryPickToken="${{ inputs.autoCherryPickToken }}"
commitMessage="${{ github.event.head_commit.message }}"
cherryPickToken='${{ inputs.autoCherryPickToken }}'
commitMessage='${{ github.event.head_commit.message }}'
branches=$(echo '$commitMessage' | grep '$cherryPickToken' | grep -o1 -E "([0-9]+\.[0-9]+\.x)")
branchCommitMessage=$(echo '$commitMessage' | grep -v '$cherryPickToken')
for branch in $branches
do
git checkout $branch
if git cherry-pick ${{ github.sha }}
then
echo "::notice title=Commit cherry-picked::${{ github.sha }} to branch `$branch`"
echo "::notice title=Commit cherry-picked::`${{ github.sha }}` to branch `$branch`"
else
echo "::error title=Cannot cherry-pick::${{ github.sha }} to branch `$branch`. Manual procedure required"
echo "::error title=Cannot cherry-pick::`${{ github.sha }}` to branch `$branch`. Manual procedure required"
exit 1
fi
git commit –amend -m "$branchCommitMessage"
Expand Down

0 comments on commit 7d7aecd

Please sign in to comment.