Skip to content

Commit 5f8e252

Browse files
committed
Get the right standalone suffix when PR on a "maint/update_code_for_*" branch
Signed-off-by: paul.profizi <[email protected]>
1 parent 357d10a commit 5f8e252

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ jobs:
5050
elif ${{ github.event_name == 'pull_request' }}; then
5151
# If the PR is server-sync then extract suffix from branch name
5252
sub='maint/update_code_for_'
53-
if [[ "${{ github.head_ref }}" == *"$sub"* ]]; then
53+
if [[ "${{ github.head_ref }}" == *"$sub"*]]; then
5454
ref_name=${{ github.head_ref }}
5555
base_ref=${{ github.base_ref }}
5656
suffix=${ref_name/$sub[0-9][0-9][0-9]/''}
5757
suffix=${suffix/_on_$base_ref/''}
58+
elif [["${{ github.base_ref }}" == *"$sub"*]]; then
59+
base_ref=${{ github.base_ref }}
60+
suffix=${base_ref/$sub[0-9][0-9][0-9]/''}
61+
suffix=${suffix/_on_*/''}
5862
fi
5963
echo "suffix=$suffix" >> "$GITHUB_OUTPUT"
6064
fi

0 commit comments

Comments
 (0)