From 62d36798bbce4f419d907492528f3a9daaba6843 Mon Sep 17 00:00:00 2001 From: filzrev <103790468+filzrev@users.noreply.github.com> Date: Thu, 5 Nov 2026 13:49:43 +0900 Subject: [PATCH] chore: update windows defender configure action --- .../actions/add-windowsdefender-exclusions/action.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/add-windowsdefender-exclusions/action.yaml b/.github/actions/add-windowsdefender-exclusions/action.yaml index d927a869e8..3356858be7 100644 --- a/.github/actions/add-windowsdefender-exclusions/action.yaml +++ b/.github/actions/add-windowsdefender-exclusions/action.yaml @@ -19,9 +19,16 @@ runs: } catch { if ($i -ge $maxRetries) { + $serviceStatus = (Get-Service WinDefend).Status + Write-Host "Status: $serviceStatus" + if($serviceStatus -eq 'Running') { + Get-MpComputerStatus | Format-List * | Out-String -Stream | where { $_ -notmatch ':\s*$' } | Write-Host + Get-MpPreference | Format-List * | Out-String -Stream | where { $_ -notmatch ':\s*$' } | Write-Host + } + throw } - + # Write warning by using Workflow command syntax Write-Host "::warning::Failed to configure Windows Defender exclusions (attempt $i/$maxRetries). Retrying..." Start-Sleep -Seconds 1