Skip to content

Commit

Permalink
Add documentation on how to user this action.
Browse files Browse the repository at this point in the history
  • Loading branch information
aholmes committed Feb 3, 2023
1 parent 14f7b08 commit 2939753
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

This repository is a GitHub Action that generates UML diagrams (as SVGs) from PlantUML files.

## How to use this action in your repository

This example GitHub Action will cause SVG diagrams to be generated from PUML files when they are committed and pushed the the repository.

```yaml
---
name: PlantUML Generation

on:
push:
paths:
- '**.puml'
workflow_dispatch:

jobs:
plantuml:
runs-on: ubuntu-latest

steps:
- name: Generate PUML diagrams
uses: uclahs-cds/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ghcr-username: ${{ github.actor }}
ghcr-password: ${{ secrets.GITHUB_TOKEN }}
```
### Variables
| | |
|-|-|
| `github-token` | A PAT used to commit and push generated and removed SVGs back into the repository. |
| `ghcr-username` | The username used to authenticate with ghcr.io to pull the PlantUML docker image. |
| `ghcr-password` | The password used with `ghcr-username`. |

## Description

When this action is triggered on a branch, it will scan git commits to find the last commit since a push or all commits in a branch, depending on how the Action is triggered. It will look for additions, deletions, and modifications to files ending with the `.puml` extension. Three operations occur following this lookup:
Expand Down

0 comments on commit 2939753

Please sign in to comment.