-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (60 loc) · 2.16 KB
/
sync-comp.yml
File metadata and controls
62 lines (60 loc) · 2.16 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
name: CaC to OSCAL Component Definition
on:
workflow_dispatch:
inputs:
cac-reference:
description: 'ComplianceAsCode git reference'
required: true
default: 'master'
oscal-profile:
required: true
description: Name of profile in trestle workspace to be imported into the component definition
product:
required: true
description: Name of the product in CaC content to process
cac-profile-id:
required: true
description: Profile ID under product in CaC content to process
component-type:
required: false
default: "software"
description: Type of component definition (defaults to "software")
permissions: read-all
jobs:
update-component:
name: Create component definition
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: quay.io/continuouscompliance/trestle-bot:dev-main-0ceeb01
steps:
- name: Clone
uses: actions/checkout@v4
with:
path: complytime-content
- name: Checkout CaC repo
uses: actions/checkout@v4
with:
repository: ComplianceAsCode/content
ref: ${{ github.event.inputs.cac-reference }}
path: content
- name: Update component definition
working-directory: ./complytime-content
env:
OSCAL_PROFILE: ${{ github.event.inputs.oscal-profile }}
PRODUCT: ${{ github.event.inputs.product}}
CAC_PROFILE: ${{ github.event.inputs.cac-profile-id }}
TYPE: ${{ github.event.inputs.component-type }}
CAC_CONTENT_ROOT: ${{ github.workspace }}/content
ACTOR: ${{ github.actor }}
run: |
trestlebot sync-cac-content component-definition \
--cac-content-root "$CAC_CONTENT_ROOT" \
--cac-profile "$CAC_CONTENT_ROOT/products/$PRODUCT/profiles/$CAC_PROFILE.profile" \
--oscal-profile $OSCAL_PROFILE \
--product "$PRODUCT" \
--component-definition-type "$TYPE" \
--author-name="$ACTOR" \
--author-email="$ACTOR@users.noreply.github.com" \
--file-patterns="component-definitions/*"