Skip to content

Commit

Permalink
docs(actions): adds examples with outputs to actions documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Oct 25, 2023
1 parent 83a0e59 commit ef27ba5
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,43 @@ Tasks in trestle-bot that we want to expose as a GitHub Action are located here.
First, create an entrypoint script for the new action in the `trestlebot/entrypoints` directory. Then add the action by creating a new directory in the `actions` directory with an `action.yml` that references your new entrypoint. See the [GitHub Actions documentation](https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action) for more information.


## Examples

Below are example workflow snippets that show how they can be used with other actions for additional automation and pull request customization.


```yaml
name: ci

on:
push:
branches:
- 'main'

jobs:
update-content:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Run trestlebot
id: trestlebot
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main
with:
markdown_path: "markdown/profiles"
oscal_model: "profile"
branch: "autoupdate-${{ github.run_id }}"
target_branch: "main"
github_token: ${{ secret.GITHUB_TOKEN }}
- uses: actions/labeler@v4
if: steps.trestlebot.outputs.changes == 'true'
with:
pr-number: |
${{ steps.trestlebot.outputs.pr_number }}
```

0 comments on commit ef27ba5

Please sign in to comment.