diff --git a/.github/workflows/label-cherry-pick.yaml b/.github/workflows/label-cherry-pick.yaml index 6788ea9cf93be..e338e313fcc8b 100644 --- a/.github/workflows/label-cherry-pick.yaml +++ b/.github/workflows/label-cherry-pick.yaml @@ -72,11 +72,16 @@ jobs: id: cherry-pick continue-on-error: true run: | - set -e git fetch origin ${{ matrix.target_branch }} + set +e git cherry-pick -x $MERGE_COMMIT_SHA - git add . - git cherry-pick --continue + RES=$? + set -e + if [ $RES -ne 0 ]; then + git add . + git cherry-pick --continue + fi + exit $RES - name: Create Pull Request id: create-pr