diff --git a/.github/workflows/CodeQL Advanced - Security.yml b/.github/workflows/CodeQL Advanced - Security.yml index c655aa206..55655edeb 100644 --- a/.github/workflows/CodeQL Advanced - Security.yml +++ b/.github/workflows/CodeQL Advanced - Security.yml @@ -14,9 +14,13 @@ name: "CodeQL Advanced - Security" on: workflow_dispatch: push: - branches: [ "main" ] + branches: ["main"] + paths: + - "**.cs" pull_request: - branches: [ "main" ] + branches: ["main"] + paths: + - "**.cs" jobs: analyze: diff --git a/.github/workflows/powershell.yml b/.github/workflows/powershell.yml index 508bbcfa5..e263ebd58 100644 --- a/.github/workflows/powershell.yml +++ b/.github/workflows/powershell.yml @@ -11,9 +11,18 @@ name: PSScriptAnalyzer on: push: - branches: [ "main" ] + branches: ["main"] + paths: + - "**.ps1" + - "**.psm1" + - "**.psd1" + pull_request: - branches: [ "main" ] + branches: ["main"] + paths: + - "**.ps1" + - "**.psm1" + - "**.psd1" permissions: contents: read