Skip to content

Commit b06c349

Browse files
committed
ci: consolidate workflows into modern PSScriptAnalyzer
1 parent f4eb1c8 commit b06c349

2 files changed

Lines changed: 11 additions & 87 deletions

File tree

.github/workflows/codacy.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/powershell.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,34 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
#
6-
# https://github.com/microsoft/action-psscriptanalyzer
7-
# For more information on PSScriptAnalyzer in general, see
8-
# https://github.com/PowerShell/PSScriptAnalyzer
9-
101
name: PSScriptAnalyzer
112

123
on:
134
push:
14-
branches: [ "master" ]
5+
branches:
6+
- '**'
157
pull_request:
16-
branches: [ "master" ]
17-
schedule:
18-
- cron: '20 3 * * 1'
8+
branches:
9+
- master
1910

2011
permissions:
2112
contents: read
2213

2314
jobs:
24-
build:
15+
analyze:
2516
permissions:
26-
contents: read # for actions/checkout to fetch code
27-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
28-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
17+
contents: read
18+
security-events: write
2919
name: PSScriptAnalyzer
3020
runs-on: ubuntu-latest
3121
steps:
32-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
3323

3424
- name: Run PSScriptAnalyzer
35-
uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f
25+
uses: microsoft/psscriptanalyzer-action@v1.1
3626
with:
37-
# Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options.
38-
# The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules.
3927
path: .\
4028
recurse: true
41-
# Include your own basic security rules. Removing this option will run all the rules
42-
includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"'
4329
output: results.sarif
4430

45-
# Upload the SARIF file generated in the previous step
46-
- name: Upload SARIF results file
47-
uses: github/codeql-action/upload-sarif@v2
31+
- name: Upload SARIF results
32+
uses: github/codeql-action/upload-sarif@v3
4833
with:
4934
sarif_file: results.sarif

0 commit comments

Comments
 (0)