-
Notifications
You must be signed in to change notification settings - Fork 53
45 lines (40 loc) · 1.18 KB
/
repo.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# Repository configuration analysis
#
# NOTES:
# This workflow uses PSRule.
# You can read more about these linting tools and configuration options here:
# PSRule - https://aka.ms/ps-rule and https://github.com/Microsoft/PSRule.Rules.GitHub
name: Repository
on:
push:
branches: [main, 'release/*']
pull_request:
branches: [main, 'release/*']
schedule:
- cron: '24 22 * * 0' # At 10:24 PM, on Sunday each week
workflow_dispatch:
jobs:
repo:
name: Repository configuration
runs-on: ubuntu-latest
# if: github.repository == 'microsoft/PSRule'
permissions:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run PSRule analysis
uses: Microsoft/[email protected]
with:
modules: PSRule.Rules.GitHub
outputFormat: Sarif
outputPath: reports/ps-rule-results.sarif
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload results to security tab
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: reports/ps-rule-results.sarif