Skip to content

Incremental Builds #2648

Incremental Builds

Incremental Builds #2648

Workflow file for this run

# 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
jobs:
build:
name: PSScriptAnalyzer
runs-on: ubuntu-latest
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run PSScriptAnalyzer
uses: ./Actions/RunPSScriptAnalyzer
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@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
with:
sarif_file: results.sarif