Skip to content

Commit

Permalink
ci: Adjust CI Build for Doc-Only PRs validations with adjustments to …
Browse files Browse the repository at this point in the history
…be more directory based
  • Loading branch information
agneszitte committed Apr 2, 2024
1 parent 44e5d21 commit df2c072
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build/stage-determine-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
# Normalize the target branch name for PR builds or default to 'master' for push builds
$targetBranchName = $isPR ? $prTargetBranch -replace 'refs/heads/', '' : "master"
Write-Host "Build context determined: $(if ($isPR) { 'Pull Request targeting ' + $targetBranchName } else { 'Push' })"
# Fetch the target or default base branch and determine the merge base
Expand All @@ -36,7 +35,9 @@ jobs:
}
foreach ($file in $changedFiles -split "`n") {
if ($file.EndsWith(".md") -or $file -like "*/toc.yml") {
$isDoc = $file.StartsWith("doc/") -or $file -match "^.*/?[^/]*\.md$" -or $file.StartsWith(".github/")
if ($isDoc) {
$docFiles++
} else {
$nonDocFiles++
Expand Down Expand Up @@ -67,4 +68,4 @@ jobs:
Write-Host "##vso[task.setvariable variable=docsOnly;isOutput=true]$docsOnly"
Write-Host "##vso[task.setvariable variable=nonDocsOnly;isOutput=true]$nonDocsOnly"
Write-Host "##vso[task.setvariable variable=mixedChanges;isOutput=true]$mixedChanges"
name: DetermineChanges
name: DetermineChanges

0 comments on commit df2c072

Please sign in to comment.