ArkadiuszMichalski 8 months ago committed by Don Ho
parent 045d21aa15
commit 35f601b665

@ -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"
@ -40,7 +41,7 @@ jobs:
$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
}

Loading…
Cancel
Save