Skip to content

Commit

Permalink
building action definition to implement trestle-bot create-cd
Browse files Browse the repository at this point in the history
  • Loading branch information
gvauter committed May 15, 2024
1 parent 4398466 commit e32df4f
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/trestlebot-create-component-definition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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@v3
- 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/components"
branch: "create-component-definition-${{ github.run_id }}"
target_branch: "main"
file_pattern: "*.json,markdown/*,rules/*"
commit_user_name: "trestle-bot[bot]"
commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"
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 }}



0 comments on commit e32df4f

Please sign in to comment.