From 23de93eafbe9cc819e89798a314992ced5fab61f Mon Sep 17 00:00:00 2001 From: v-amolpatil Date: Sun, 24 Sep 2023 17:02:08 +0530 Subject: [PATCH 1/2] Update getSolutionName.ps1 --- .script/package-automation/getSolutionName.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.script/package-automation/getSolutionName.ps1 b/.script/package-automation/getSolutionName.ps1 index 92e58ff167a..6324ccea0b0 100644 --- a/.script/package-automation/getSolutionName.ps1 +++ b/.script/package-automation/getSolutionName.ps1 @@ -17,6 +17,18 @@ try $filteredFiles = $diff | Where-Object {$_ -match "Solutions/"} | Where-Object {$_ -notlike "Solutions/Images/*"} | Where-Object {$_ -notlike "Solutions/*.md"} | Where-Object { $_ -notlike '*system_generated_metadata.json' } Write-Host "Filtered Files $filteredFiles" + # IDENTIFY EXCLUSIONS AND IF THERE ARE NO FILES AFTER EXCLUSION THEN SKIP WORKFLOW RUN + $exclusionList = @(".py$",".png$",".jpg$",".jpeg$",".conf$", ".svg$", ".html$", ".ps1$", ".psd1$", "requirements.txt$", "host.json$", "proxies.json$", "/function.json$", ".xml$", ".zip$") + + $filterOutExclusionList = $filteredFiles | Where-Object { $_ -notmatch ($exclusionList -join '|') } + + if ($filterOutExclusionList.Count -le 0) + { + Write-Host "Skipping GitHub Action as changes in PR are not valid and contains only excluded files!" + Write-Output "solutionName=" >> $env:GITHUB_OUTPUT + exit 0 + } + if ($filteredFiles.Count -gt 0) { if ($instrumentationKey -ne '') From f7b908f3911f5f55e8f624e48188942e8a561b28 Mon Sep 17 00:00:00 2001 From: v-amolpatil Date: Mon, 25 Sep 2023 14:33:59 +0530 Subject: [PATCH 2/2] Update getSolutionName.ps1 --- .script/package-automation/getSolutionName.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.script/package-automation/getSolutionName.ps1 b/.script/package-automation/getSolutionName.ps1 index 6324ccea0b0..2ddfb8cd964 100644 --- a/.script/package-automation/getSolutionName.ps1 +++ b/.script/package-automation/getSolutionName.ps1 @@ -18,7 +18,7 @@ try Write-Host "Filtered Files $filteredFiles" # IDENTIFY EXCLUSIONS AND IF THERE ARE NO FILES AFTER EXCLUSION THEN SKIP WORKFLOW RUN - $exclusionList = @(".py$",".png$",".jpg$",".jpeg$",".conf$", ".svg$", ".html$", ".ps1$", ".psd1$", "requirements.txt$", "host.json$", "proxies.json$", "/function.json$", ".xml$", ".zip$") + $exclusionList = @(".py$",".png$",".jpg$",".jpeg$",".conf$", ".svg$", ".html$", ".ps1$", ".psd1$", "requirements.txt$", "host.json$", "proxies.json$", "/function.json$", ".xml$", ".zip$", ".md$") $filterOutExclusionList = $filteredFiles | Where-Object { $_ -notmatch ($exclusionList -join '|') }