name: CI

on:
  push:
    branches: [dev, early]
  pull_request:
    branches: [dev, early]
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  PSScriptAnalyzer:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Run PSScriptAnalyzer
        uses: microsoft/psscriptanalyzer-action@v1.0
        with:
          severity: error
          path: .\
          recurse: true
          output: results.sarif
      - name: Upload SARIF results file
        uses: github/codeql-action/upload-sarif@v2
        with:
          sarif_file: results.sarif
