Skip to content

Commit 3309f8c

Browse files
Create a PR only if curly braces are present in the Branch name
Signed-off-by: Shreeya Patel <[email protected]>
1 parent 002ef04 commit 3309f8c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/kernel-build-and-test-x86_64.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,15 @@ jobs:
362362
if: success() || failure()
363363

364364
steps:
365+
- name: Check if branch name contains curly brackets
366+
run: |
367+
BRANCH_NAME="${{ github.ref_name }}"
368+
if [[ ! "$BRANCH_NAME" =~ \{ ]] || [[ ! "$BRANCH_NAME" =~ \} ]]; then
369+
echo "Branch name '$BRANCH_NAME' does not contain curly brackets, skipping PR creation"
370+
exit 1
371+
fi
372+
echo "Branch name contains curly brackets, proceeding with PR creation checks"
373+
365374
- name: Check if tests passed and no regressions
366375
run: |
367376
# Skip PR if any test stage failed

0 commit comments

Comments
 (0)