You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Infrastructure Diagrams
v1.0.2
This is a GitHub Action to create and commit infrastructure diagrams using the Diagrams tool. This deploy action is meant to be implemented as part of your PR process. This action will also add a review comment of the changes.
Using the syntax defined in Diagrams, create your infrastructure diagrams in the input_dir
of your choice (default is _documentation/diagrams).
See this repo's example here for the diagram above
Add the action to your workflow and the generated diagrams will be added to the PR branch once the workflow completes.
# .github/workflows/generate-and-commit-diagrams.yml
name: Generate and commit diagrams
on:
pull_request:
branches: [main]
jobs:
update-infrastructure-diagrams:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Infrastructure Diagrams
uses: olmesm/infrastructure-diagram-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# input_dir: _documentation/diagrams
# user_name: Bot
# user_email: [email protected]
# commit_message: Diagrams generated with [Infrastructure Diagram Action](https://github.com/olmesm/infrastructure-diagram-action)
# disable_review_comment: false
Required | Input | Description |
---|---|---|
yes | github_token | Set a generated github_token for pushing to the remote branch. |
debug | debug action | |
input_dir | Set an input directory for processing. | |
user_name | Set Git user.name | |
user_email | Set Git user.email | |
commit_message | Set a custom commit message with a triggered commit hash | |
disable_review_comment | Disable posting a review comment |
- Create a test branch with the script
sh scripts/create-test-pr.sh
- Check the generated diagram matches _documentation/diagrams/advancedweb_service_with_on-premise(...).png to ensure no regression.
sh ./scripts/release.sh "release message"
- Improve speed by building and hosting a release image
- Add additional inputs listed in action.yml