diff --git a/.github/workflows/regenerate-cd.yml b/.github/workflows/regenerate-cd.yml deleted file mode 100644 index 6889526..0000000 --- a/.github/workflows/regenerate-cd.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Regenerate component definition content -on: - push: - branches: - - main - paths: - - 'profiles/**' - - 'catalogs/**' - - 'component-definitions/**' - -jobs: - update: - name: Regenerate content - runs-on: ubuntu-latest - steps: - - name: Generate app token - uses: tibdex/github-app-token@v2.1.0 - id: get_installation_token - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - permissions: >- - {"contents": "write", "pull_requests": "write"} - - name: Clone - uses: actions/checkout@v4 - with: - token: ${{ steps.get_installation_token.outputs.token }} - - name: Regenerate component definitions - id: regenerate - uses: RedHatProductSecurity/trestle-bot/actions/autosync@v0.7.2 - with: - markdown_path: "markdown/components" - oscal_model: "compdef" - file_pattern: "markdown/*" - branch: "autoupdate-${{ github.run_id }}" - target_branch: "main" - skip_assemble: true - commit_user_name: "trestle-bot[bot]" - commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com" - github_token: ${{ steps.get_installation_token.outputs.token }} \ No newline at end of file diff --git a/.github/workflows/transform-rules.yml b/.github/workflows/transform-rules.yml index 6d46187..a957a6c 100644 --- a/.github/workflows/transform-rules.yml +++ b/.github/workflows/transform-rules.yml @@ -36,5 +36,17 @@ jobs: with: file_pattern: "*.json,rules/*" branch: ${{ inputs.branch }} + commit_message: "Transform rules to OSCAL [skip-ci]" + commit_user_name: "trestle-bot[bot]" + commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com" + - name: Regenerate component definitions + uses: RedHatProductSecurity/trestle-bot/actions/autosync@v0.7.1 + with: + markdown_path: "markdown/components" + oscal_model: "compdef" + file_pattern: "markdown/*" + branch: ${{ inputs.branch }} + skip_assemble: true + commit_message: "Generate markdown changes [skip-ci]" commit_user_name: "trestle-bot[bot]" commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com" \ No newline at end of file diff --git a/.github/workflows/update-profiles.yml b/.github/workflows/update-profiles.yml index a641941..66e4703 100644 --- a/.github/workflows/update-profiles.yml +++ b/.github/workflows/update-profiles.yml @@ -21,6 +21,7 @@ jobs: with: token: ${{ steps.get_installation_token.outputs.token }} - name: Update from upstream repo + id: sync_upstreams uses: RedHatProductSecurity/trestle-bot/actions/sync-upstreams@v0.7.2 with: branch: "sync-upstream-${{ github.run_id }}" @@ -32,3 +33,15 @@ jobs: github_token: ${{ steps.get_installation_token.outputs.token }} sources: | https://github.com/RedHatProductSecurity/oscal-profiles@main + - name: Regenerate component definitions + if: ${{ steps.sync_upstreams.outputs.commit }} + uses: RedHatProductSecurity/trestle-bot/actions/autosync@v0.7.2 + with: + markdown_path: "markdown/components" + oscal_model: "compdef" + file_pattern: "markdown/*" + branch: "sync-upstream-${{ github.run_id }}" + skip_assemble: true + commit_message: "Generate markdown changes [skip ci]" + commit_user_name: "trestle-bot[bot]" + commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"