-
Notifications
You must be signed in to change notification settings - Fork 31
69 lines (58 loc) · 1.83 KB
/
ci.yaml
File metadata and controls
69 lines (58 loc) · 1.83 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Run CI tests
#
# Note:
# This workflow is designed to run only in Azure/PSRule.Rules.Azure-quickstart.
# You can safely deleted this file if you have templated this repository to your GitHub organization.
# For PSRule documentation see:
# https://aka.ms/ps-rule
# For action details see:
# https://aka.ms/ps-rule-action
name: CI
# Run for main or PRs against main
on:
push:
branches: [main, 'dependencies/*']
pull_request:
branches:
- main
schedule:
- cron: '54 20 * * 0' # At 08:54 PM, on Sunday each week
workflow_dispatch:
permissions: {}
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
if: github.repository == 'Azure/PSRule.Rules.Azure-quickstart'
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check repository content
uses: microsoft/ps-rule@46451b8f5258c41beb5ae69ed7190ccbba84112c # v2.9.0
with:
modules: PSRule.Rules.MSFT.OSS
- name: Check Azure samples
uses: microsoft/ps-rule@46451b8f5258c41beb5ae69ed7190ccbba84112c # v2.9.0
with:
modules: PSRule.Rules.Azure
outputFormat: Sarif
outputPath: reports/ps-rule-results.sarif
summary: true
- name: Upload results to security tab
uses: github/codeql-action/upload-sarif@76621b61decf072c1cee8dd1ce2d2a82d33c17ed # v3.29.5
if: always()
with:
sarif_file: reports/ps-rule-results.sarif
- name: Upload results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: always()
with:
name: PSRule-Sarif
path: reports/ps-rule-results.sarif
retention-days: 1
if-no-files-found: error