Add FilePattern support for .github\workflow sync (#5919)
Given we cannot create subfolders under .github\workflow folder and we have repos that want additional workflows then we have in the tools repo we need to setup a file pattern matching for the sync processing to only sync the ones we want to be common. For now just use the existing *event* pattern but we can move them to another pattern similar to *common* or *sync* in the future as we add more common workflows. Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
This commit is contained in:
parent
211b1fdb95
commit
758460d618
@ -21,7 +21,7 @@ steps:
|
||||
}
|
||||
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-.github/workflows")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
|
||||
{
|
||||
$filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath '.github/workflows/*' -DiffFilterType ""
|
||||
$filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath '.github/workflows/*event*' -DiffFilterType ""
|
||||
if (($LASTEXITCODE -eq 0) -and ($filesInCommonDir.Count -gt 0))
|
||||
{
|
||||
Write-Host "##vso[task.LogIssue type=error;]Changes to files under '.github/workflows' directory should not be made in this Repo`n${filesInCommonDir}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user