Skip to content

Commit 5ae8f39

Browse files
Create a PR only if curly braces are present in the Branch name
Signed-off-by: Shreeya Patel <spatel@ciq.com>
1 parent 88820a0 commit 5ae8f39

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
@@ -365,6 +365,15 @@ jobs:
365365
if: success() || failure()
366366

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

0 commit comments

Comments
 (0)