diff --git a/.github/workflows/CI_build.yml b/.github/workflows/CI_build.yml index 2d7f4ddb9..5a5c238f3 100644 --- a/.github/workflows/CI_build.yml +++ b/.github/workflows/CI_build.yml @@ -20,6 +20,7 @@ jobs: run: | $allowMaster = $true $folders_onejob = "PowerEditor/(Test|(installer/(filesForTesting|functionList)))/" + $folders_nowork = "\.github/ISSUE_TEMPLATE" $files_nowork = "md|txt|log|ini" $files_needwork = "CMakeLists\.txt" @@ -34,13 +35,13 @@ jobs: $commit_message = (git show -s --format=%B) } else { - $last_commit = @(Invoke-RestMethod ${{ github.event.pull_request._links.commits.href }})[0] | Select-Object -Last 1 + $last_commit = @(Invoke-RestMethod ${{ github.event.pull_request._links.commits.href }})[0] | Select-Object -Last 1 $commit_message = $last_commit.commit.message } $commit_title = ($commit_message -split "[\r\n]+")[0] $files_modified = @(git diff --name-only HEAD~1) - $files_needwork_all = @($files_modified | Where-Object {$_ -notmatch "\.(xml|$files_nowork)$|$folders_onejob" -or $_ -match "$files_needwork$"}) + $files_needwork_all = @($files_modified | Where-Object {$_ -notmatch "\.(xml|$files_nowork)$|$folders_nowork|$folders_onejob" -or $_ -match "($files_needwork)$"}) if ($allowMaster -or !$isMaster) { if ($commit_title -match "\[force all\]") { @@ -52,7 +53,7 @@ jobs: Write-Output $matrix_onejob >> $env:GITHUB_OUTPUT } elseif (($files_modified.length -gt 0 -and $files_needwork_all.length -eq 0) -or $commit_title -match "\[force (xml|none)\]") { - if (@($files_modified | Where-Object {$_ -notmatch "\.($files_nowork)$"}).length -eq 0 -or $commit_title -match "\[force none\]") { + if (@($files_modified | Where-Object {$_ -notmatch "\.($files_nowork)$|$folders_nowork"}).length -eq 0 -or $commit_title -match "\[force none\]") { Write-Output "Changed files on this commit don't require any additional tasks.`n" Write-Output "result=OK" >> $env:GITHUB_OUTPUT }