Skip to content

Commit c52e739

Browse files
authored
Update main.yml (to handle multiline commit messages) #GITBUILD
1 parent b27607f commit c52e739

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/main.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ jobs:
2525
run: |
2626
# cancel early, if not build commit
2727
$strVal ='${{ github.event.commits[0].message }}'
28-
if($strVal -clike '*#GITBUILD*')
28+
# Convert commit message to a single line if multiline
29+
$singleLineStrVal = $strVal -replace "`r`n", " " -replace "`n", " "
30+
if($singleLineStrVal -match '#GITBUILD')
2931
{
3032
Write-Host 'True'
3133
} else {

0 commit comments

Comments
 (0)