Skip to content

Commit

Permalink
Fix multiple labels
Browse files Browse the repository at this point in the history
  • Loading branch information
oxve committed Nov 14, 2023
1 parent d2977a4 commit a5fbeae
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/label-cherry-pick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,12 @@ jobs:
if [[ $branch == $BASE_REF ]]; then
continue
fi
for label in $labels; do
if [[ $label == "cp-$branch" ]]; then
echo $branch
filtered_branches+=("$branch")
fi
done
if [[ ${labels[@]} =~ "cp-$branch" ]]; then
filtered_branches+=("$branch")
fi
done
echo -n "$filtered_branches" | jq -cRs 'split("\n")'
echo "target_branch=$(echo -n "$filtered_branches" | jq -cRs 'split("\n")')" >> $GITHUB_OUTPUT
echo "target_branch=$(echo -n "${filtered_branches[@]}" | jq -cRs 'split(" ")')" >> $GITHUB_OUTPUT
cherry_pick:
runs-on: ubuntu-latest
Expand Down

0 comments on commit a5fbeae

Please sign in to comment.