-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jennifer Power <[email protected]>
- Loading branch information
Showing
15 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Update upstream content | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: 'Reference to sync from' | ||
required: false | ||
default: 'main' | ||
|
||
jobs: | ||
update: | ||
name: Run update | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Clone | ||
uses: actions/checkout@v4 | ||
- name: Update from upstream repo | ||
id: sync_upstreams | ||
uses: RedHatProductSecurity/trestle-bot/actions/sync-upstreams@main | ||
with: | ||
branch: "sync-upstream-${{ github.run_id }}" | ||
target_branch: "main" | ||
commit_message: "Updates content from trestlebot-demo-cd repository" | ||
pull_request_title: "Updates content from trestlebot-demo-cd repository" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
sources: | | ||
https://github.com/RedHatProductSecurity/oscal-profiles@main |
49 changes: 49 additions & 0 deletions
49
.github/workflows/trestlebot-create-component-definition.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
name: Trestle-bot create component-definition | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
profile_name: | ||
description: Name of the Trestle profile to use for the component definition | ||
required: true | ||
component_definition_name: | ||
description: Name of the component definition to create | ||
required: true | ||
component_title: | ||
description: Name of the component to create in the generated component definition | ||
required: true | ||
component_type: | ||
description: Type of the component (e.g. service, policy, physical, validation, etc.) | ||
required: false | ||
default: "service" | ||
component_description: | ||
description: Description of the component to create | ||
required: true | ||
|
||
jobs: | ||
create-component-definition: | ||
name: Create component definition | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Create component definition and open pull request | ||
id: generate-cd | ||
uses: RedHatProductSecurity/trestle-bot/actions/create-cd@main | ||
with: | ||
profile_name: ${{ github.event.inputs.profile_name }} | ||
component_definition_name: ${{ github.event.inputs.component_definition_name}} | ||
component_title: ${{ github.event.inputs.component_title }} | ||
component_type: ${{ github.event.inputs.component_type }} | ||
component_description: ${{ github.event.inputs.component_description }} | ||
markdown_path: "markdown/component-definitions" | ||
branch: "create-component-definition-${{ github.run_id }}" | ||
target_branch: "main" | ||
file_pattern: "*.json,markdown/*,rules/*" | ||
commit_message: "adds component ${{ github.event.inputs.component_title }} in ${{ github.event.inputs.component_definition_name }}" | ||
pull_request_title: "Add component ${{ github.event.inputs.component_title }} to ${{ github.event.inputs.component_definition_name }}" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: Trestle-bot rules-transform and autosync | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'profiles/**' | ||
- 'catalogs/**' | ||
- 'component-definitions/**' | ||
- 'markdown/**' | ||
- 'rules/**' | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
rules-transform-and-autosync: | ||
name: Rules Transform and AutoSync | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: AutoSync | ||
id: autosync | ||
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main | ||
with: | ||
markdown_path: "markdown/component-definitions" | ||
oscal_model: "compdef" | ||
file_pattern: "*.json,markdown/*" | ||
- name: Check if rules changed | ||
id: changes | ||
uses: dorny/paths-filter@v3 | ||
with: | ||
filters: | | ||
rules: | ||
- 'rules/**' | ||
- name: Rules Transform | ||
if: steps.changes.outputs.rules == 'true' | ||
uses: RedHatProductSecurity/trestle-bot/actions/rules-transform@main | ||
with: | ||
markdown_path: "markdown/component-definitions" | ||
commit_message: "Auto-transform rules [skip ci]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.venv |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.