-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor GitHub Actions for linting: streamline linter job and add de…
…dicated lint-trigger workflow
- Loading branch information
1 parent
375e347
commit 9e04939
Showing
3 changed files
with
48 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,18 @@ | ||
name: linter | ||
name: lint | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/*.ps1' | ||
pull_request: | ||
paths: | ||
- '**/*.ps1' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
jobs: | ||
lint: | ||
name: PSScriptAnalyzer | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Run PSScriptAnalyzer | ||
uses: microsoft/[email protected] | ||
with: | ||
path: . | ||
recurse: true | ||
output: results.sarif | ||
|
||
- name: Run PSScriptAnalyzer | ||
uses: microsoft/[email protected] | ||
with: | ||
path: . | ||
recurse: true | ||
output: results.sarif | ||
|
||
- name: Upload SARIF results file | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: results.sarif | ||
- name: Upload SARIF results file | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: results.sarif |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: lint-trigger | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "*.ps1" | ||
pull_request: | ||
paths: | ||
- "*.ps1" | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
security-events: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/lint |
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