Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update trestlebot actions from TEMPLATES #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/trestlebot-autosync-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
name: Trestle-bot autosync catalog updates

on:
pull_request:
push:
branches:
- main
paths:
- 'catalogs/**'
- 'markdown/catalogs/**'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
autosync:
name: Autosync catalog content
Expand All @@ -18,13 +22,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Run autosync
id: autosync
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main
with:
markdown_path: "markdown/catalogs"
oscal_model: "catalog"
file_pattern: "*.json,markdown/*"
branch: ${{ github.head_ref }}
9 changes: 5 additions & 4 deletions .github/workflows/trestlebot-autosync-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
name: Trestle-bot autosync profile updates

on:
pull_request:
push:
branches:
- main
paths:
- 'profiles/**'
- 'markdown/profiles/**'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
autosync:
name: Autosync profile content
Expand All @@ -18,13 +22,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Run autosync
id: autosync
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main
with:
markdown_path: "markdown/profiles"
oscal_model: "profile"
file_pattern: "*.json,markdown/*"
branch: ${{ github.head_ref }}
32 changes: 32 additions & 0 deletions .github/workflows/trestlebot-autosync-ssp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Trestle-bot autosync ssp updates
on:
push:
branches:
- main
paths:
- 'profiles/**'
- 'catalogs/**'
- 'component-definitions/**'
- 'system-security-plans/**'
- 'markdown/**'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
autosync:
name: Autosync ssp content
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run autosync
id: autosync
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main
with:
markdown_path: "markdown/system-security-plans"
oscal_model: "ssp"
file_pattern: "*.json,markdown/*"
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Trestle-bot Create Component Definition
name: Trestle-bot create component-definition

on:
workflow_dispatch:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
component_title: ${{ github.event.inputs.component_title }}
component_type: ${{ github.event.inputs.component_type }}
component_description: ${{ github.event.inputs.component_description }}
markdown_path: "markdown/components"
markdown_path: "markdown/component-definitions"
branch: "create-component-definition-${{ github.run_id }}"
target_branch: "main"
file_pattern: "*.json,markdown/*,rules/*"
Expand Down
40 changes: 18 additions & 22 deletions .github/workflows/trestlebot-rules-transform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Trestle-bot rules-transform and autosync

on:
pull_request:
push:
branches:
- main
paths:
Expand All @@ -17,35 +17,31 @@ concurrency:
cancel-in-progress: true

jobs:
rules-transform:
name: Trestle-bot Rules Transform
rules-transform-and-autosync:
name: Rules Transform and AutoSync
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Transform rules
uses: ./.github/actions/rules-transform

autosync:
name: Trestle-bot Autosync Content
needs: rules-transform
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Autosync component-definitions
- name: AutoSync
id: autosync
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main
with:
markdown_path: "markdown/components"
markdown_path: "markdown/component-definitions"
oscal_model: "compdef"
file_pattern: "*.json,markdown/*"
branch: ${{ github.head_ref }}
- 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]"