From df2c072e402f52281c64fceb98ca71eb51321e59 Mon Sep 17 00:00:00 2001 From: agneszitte Date: Tue, 2 Apr 2024 16:21:29 -0400 Subject: [PATCH] ci: Adjust CI Build for Doc-Only PRs validations with adjustments to be more directory based --- build/stage-determine-changes.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/stage-determine-changes.yml b/build/stage-determine-changes.yml index 48d28ff44..83e82523b 100644 --- a/build/stage-determine-changes.yml +++ b/build/stage-determine-changes.yml @@ -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 @@ -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++ @@ -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 \ No newline at end of file + name: DetermineChanges