forked from RedHatProductSecurity/trestle-bot
-
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.
feat(action): prep for multiple actions
Related: PSCE-243 Signed-off-by: Alex Flom <[email protected]>
- Loading branch information
Showing
3 changed files
with
127 additions
and
1 deletion.
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
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,91 @@ | ||
name: "trestle-bot" | ||
author: "Red Hat Product Security" | ||
description: "A workflow automation manager for OSCAL formatted compliance content" | ||
|
||
inputs: | ||
markdown_path: | ||
description: Path relative to the repository path where the Trestle markdown files are located. See project README.md for more information. | ||
required: true | ||
oscal_model: | ||
description: OSCAL Model type to assemble. Values can be catalog, profile, compdef, or ssp. | ||
required: true | ||
check_only: | ||
description: "Runs tasks and exits with an error if there is a diff. Defaults to false" | ||
required: false | ||
default: "false" | ||
github_token: | ||
description: "GitHub token used to make authenticated API requests" | ||
required: false | ||
skip_assemble: | ||
description: "Skip assembly task. Defaults to false" | ||
required: false | ||
default: "false" | ||
skip_regenerate: | ||
description: "Skip regenerate task. Defaults to false." | ||
required: false | ||
default: "false" | ||
skip_items: | ||
description: "Comma-separated glob patterns list of content by Trestle name to skip during task execution. For example `profile_x,profile_y*,`." | ||
required: false | ||
ssp_index_path: | ||
description: Path relative to the repository path where the ssp index is located. See project README.md for information about the ssp index. | ||
required: false | ||
default: "ssp-index.json" | ||
commit_message: | ||
description: Commit message | ||
required: false | ||
default: "Sync automatic updates" | ||
pull_request_title: | ||
description: Custom pull request title | ||
required: false | ||
default: "Automatic updates from trestlebot" | ||
branch: | ||
description: Name of the Git branch to which modifications should be pushed. Required if Action is used on the `pull_request` event. | ||
required: false | ||
default: ${{ github.ref_name }} | ||
target_branch: | ||
description: Target branch (or base branch) to create a pull request against. If unset, no pull request will be created. If set, a pull request will be created using the `branch` field as the head branch. | ||
required: false | ||
file_pattern: | ||
description: Comma separated file pattern list used for `git add`. For example `component-definitions/*,*json`. Defaults to (`.`) | ||
required: false | ||
default: '.' | ||
repository: | ||
description: Local file path to the git repository. Defaults to the current directory (`.`) | ||
required: false | ||
default: '.' | ||
commit_user_name: | ||
description: Name used for the commit user | ||
required: false | ||
default: github-actions[bot] | ||
commit_user_email: | ||
description: Email address used for the commit user | ||
required: false | ||
default: 41898282+github-actions[bot]@users.noreply.github.com | ||
commit_author_name: | ||
description: Name used for the commit author. Defaults to the username of whoever triggered this workflow run. | ||
required: false | ||
default: ${{ github.actor }} | ||
commit_author_email: | ||
description: Email address used for the commit author. Defaults to the email of whoever triggered this workflow run. | ||
required: false | ||
default: ${{ github.actor }}@users.noreply.github.com | ||
|
||
outputs: | ||
changes: | ||
description: Value is "true" if changes were committed back to the repository. | ||
commit: | ||
description: Full hash of the created commit. Only present if the "changes" output is "true". | ||
pr_number: | ||
description: Number of the submitted pull request. Only present if a pull request is submitted. | ||
|
||
runs: | ||
using: "docker" | ||
image: "Dockerfile" | ||
entrypoint: "/entrypoint.sh" | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
|
||
branding: | ||
icon: "check" | ||
color: "green" |
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 @@ | ||
# Copyright 2023 Red Hat, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Create OSCAL content.""" | ||
|
||
import sys | ||
|
||
|
||
def create_entrypoint(): | ||
"""Creates specified OSCAL formatted content.""" | ||
pass | ||
|
||
|
||
def main(): | ||
|
||
return create_entrypoint() | ||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(main()) |