Skip to content

Commit

Permalink
docs: include example using container image
Browse files Browse the repository at this point in the history
  • Loading branch information
gvauter committed Aug 30, 2024
1 parent dba5a41 commit 2382d47
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions docs/tutorials/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ This tutorial provides an introduction to using `trestlebot` with GitHub. We wi

Before moving on, please ensure you have completed the following:

1. create a new (or use an existing) empty GitHub repository
2. clone the repo to your local workstation
3. clone the [trestle-bot](https://github.com/RedHatProductSecurity/trestle-bot/tree/main) repo to your local workstation and run `poetry install`
1. Create a new (or use an existing) empty GitHub repository
2. Clone the repo to your local workstation
3. Install trestlebot
* Option 1: Clone the [trestle-bot](https://github.com/RedHatProductSecurity/trestle-bot/tree/main) repo to your local workstation and run `poetry install`
* Option 2: Use the [trestlebot container image](https://github.com/RedHatProductSecurity/trestle-bot?tab=readme-ov-file#run-as-a-container)


### 2. Set Permissions for GitHub Actions
Expand All @@ -26,10 +28,16 @@ The `trestlebot` commands will be run inside of GitHub actions. These commands

### 3. Initialize trestlebot Workspace

We will now use the `trestlebot init` command to initialize our emtpy GitHub repository. Unlike the other trestlebot commands, this command is run on your local workstation. The trestlebot commands can be installed by cloning the [trestle-bot](https://github.com/RedHatProductSecurity/trestle-bot/tree/main) repo and running `poetry install`. For this tutorial we will be authoring a component-definition.
We will now use the `trestlebot init` command to initialize our emtpy GitHub repository. Unlike the other trestlebot commands, this command is run on your local workstation. The trestlebot commands can be installed by cloning the [trestle-bot](https://github.com/RedHatProductSecurity/trestle-bot/tree/main) repo and running `poetry install`. Alternatively these commands can be run using the [trestlebot container image](https://github.com/RedHatProductSecurity/trestle-bot?tab=readme-ov-file#run-as-a-container). For this tutorial we will be authoring a component-definition.

```
trestlebot-init --oscal-model compdef --working-dir /path-to-your-repo
trestlebot-init --oscal-model compdef --working-dir <path-to-your-repo>
```

Using container image:

```
podman run -v <path-to-your-repo>:/data:rw trestle-bot:latest --oscal-model compdef --working-dir /data
```

You should now see the following directories in your repo.
Expand Down

0 comments on commit 2382d47

Please sign in to comment.