-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (35 loc) · 1014 Bytes
/
validate.yml
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
name: Evaluate component definitions
on:
pull_request:
types: [ opened, ready_for_review, reopened, synchronize ]
branches:
- main
paths:
- 'component-definitions/**'
- 'markdown/components/**'
jobs:
test:
name: Evaluate components
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Clone
uses: actions/checkout@v3
- name: Check components
id: check-components
uses: RedHatProductSecurity/[email protected]
with:
markdown_path: "markdown/components"
oscal_model: "compdef"
check_only: true
# Only autofix if the test job fails and the PR is from the same repo
call-autofix:
needs: [test]
if: |
always() && contains(needs.*.result, 'failure')
&& github.event.pull_request.base.repo.url == github.event.pull_request.head.repo.url
uses: ./.github/workflows/autofix-cd.yml
with:
branch: ${{ github.head_ref }}
secrets: inherit