From 140484bff2405d6709b3209f186751725d4340e7 Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Fri, 22 Sep 2023 14:46:32 -0700 Subject: [PATCH] Fix cp command --- .github/workflows/label-cherry-pick.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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