Enable ability to setup custom build modes (#884) #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/microsoft/action-psscriptanalyzer | |
# For more information on PSScriptAnalyzer in general, see | |
# https://github.com/PowerShell/PSScriptAnalyzer | |
name: PSScriptAnalyzer | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
jobs: | |
build: | |
name: PSScriptAnalyzer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run PSScriptAnalyzer | |
uses: microsoft/[email protected] | |
with: | |
path: .\ | |
recurse: true | |
excludeRule: '"PSAvoidUsingInvokeExpression", "PSUseShouldProcessForStateChangingFunctions", "PSAvoidUsingWriteHost", "PSAvoidUsingCmdletAliases", "PSUseSingularNouns"' | |
output: results.sarif | |
# Upload the SARIF file generated in the previous step | |
- name: Upload SARIF results file | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: results.sarif |