Refactor GitHub Actions workflow for PowerShell script validation and… #3
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
| name: PSScriptAnalyzer | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| analyze: | |
| runs-on: ubuntu-latest # required host runner | |
| container: | |
| image: gossin/secsrv-cicd:2112 # your full environment is here | |
| steps: | |
| - name: Checkout repo # needed so the container sees your scripts | |
| uses: actions/checkout@v4 | |
| - name: Run ScriptAnalyzer on all PowerShell files | |
| run: pwsh -Command "Invoke-ScriptAnalyzer -Path . -Recurse -EnableExit" |