-
Notifications
You must be signed in to change notification settings - Fork 10
67 lines (67 loc) · 1.73 KB
/
generate_ssp.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Content Handler
on:
push:
branches:
- feature-*
- Feature-*
- develop
- main
pull_request: {}
jobs:
partial_ssp:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: .
steps:
- name: Check out repository code.
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check environment.
run: |
ls -ltra
python --version
pip --version
- name: Install dependencies.
run: |
pip install -r requirements.txt
# - name: Run tests.
# run: |
# pytest
- name: Execute script.
run: |
python oscal.py
- name: Save SSP.
uses: actions/upload-artifact@v3
with:
name: artifact-ssp
path: SSP.output.yaml
validate_oscal:
runs-on: ubuntu-20.04
if: ${{ github.ref_name == 'main' || github.ref_name == 'develop' || github.ref_name == 'feature-doc-templates' }}
needs:
- partial_ssp
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
id: checkout
- name: Setup Java
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
with:
distribution: adopt
java-version: 11
- name: Download SSP.
uses: actions/download-artifact@v3
with:
name: artifact-ssp
- name: Run oscal-cli Validation.
uses: oscal-club/[email protected]
id: validation
with:
args: ssp validate SSP.output.yaml
- name: Validation Result
shell: bash
run: |
exit $oscalcli_exit_code