From 8b1200d1b39327bfb279776c2441db448c4f6b76 Mon Sep 17 00:00:00 2001 From: Jennifer Power Date: Wed, 5 Jul 2023 16:59:07 -0400 Subject: [PATCH] feat: update for regeneration features from trestlebot Signed-off-by: Jennifer Power --- .../{assemble-cd.yml => autofix-cd.yml} | 11 +++++---- .github/workflows/validate.yml | 24 ++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) rename .github/workflows/{assemble-cd.yml => autofix-cd.yml} (73%) diff --git a/.github/workflows/assemble-cd.yml b/.github/workflows/autofix-cd.yml similarity index 73% rename from .github/workflows/assemble-cd.yml rename to .github/workflows/autofix-cd.yml index dadea93..c49a000 100644 --- a/.github/workflows/assemble-cd.yml +++ b/.github/workflows/autofix-cd.yml @@ -1,4 +1,4 @@ -name: Component Definition Assemble +name: Component Definition Autofix on: workflow_call: workflow_dispatch: @@ -9,7 +9,7 @@ concurrency: jobs: auto-update: - name: Assemble compdef content + name: Autofix compdef content runs-on: ubuntu-latest permissions: contents: write @@ -18,12 +18,13 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.head_ref }} - - name: Assemble-cd - id: assemble-cd + - name: Run trestlebot + id: autofix-cd uses: RedHatProductSecurity/trestle-bot@main with: markdown_path: "markdown/components" - assemble_model: "compdef" + oscal_model: "compdef" branch: ${{ github.head_ref }} + file_pattern: "*.json,markdown/*" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index c5bb8ee..931c60b 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -15,17 +15,19 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Clone + uses: actions/checkout@v3 with: - python-version: 3.8 - - name: Install Trestle - run: make trestle-install - - name: Validate with Trestle - run: make validate - - name: Sanity check - run: make sanity-cd + ref: ${{ github.head_ref }} + - name: Check components + id: check-components + uses: RedHatProductSecurity/trestle-bot@main + with: + markdown_path: "markdown/components" + oscal_model: "profile" + check_only: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: CSV sanity check run: make check-csv @@ -34,4 +36,4 @@ jobs: permissions: contents: write if: ${{ always() && contains(needs.*.result, 'failure') }} - uses: ./.github/workflows/assemble-cd.yml \ No newline at end of file + uses: ./.github/workflows/autofix-cd.yml \ No newline at end of file