Skip to content

Commit 6e4e224

Browse files
authored
Merge pull request #2 from aidmax/dev
Update README and add tests
2 parents 131c55d + 0eddf0a commit 6e4e224

File tree

6 files changed

+62
-11
lines changed

6 files changed

+62
-11
lines changed

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# Structurizr-cli Action
1+
# structurizr-cli GitHub Action
22

3-
This action allows you to run `structurizr-cli`.
3+
This GitHub action allows you to run [structurizr-cli](https://github.com/structurizr/cli), a command line utility for [Structurizr](https://structurizr.com/) that lets you create software architecture models based upon the [C4 model](https://c4model.com/) using a textual [domain specific language (DSL)](https://github.com/structurizr/dsl).
4+
5+
Currently, the action supports the following functionality:
6+
7+
- __Push__ content to a Structurizr workspace (the cloud service or an on-premises installation)
8+
- A model and views defined using the [Structurizr DSL](https://github.com/structurizr/dsl)
9+
- Markdown/AsciiDoc documentation
10+
- Architecture Decision Records (ADRs)
411

512
## Usage
613

@@ -26,10 +33,16 @@ jobs:
2633
uses: aidmax/structurizr-cli-action
2734
id: test
2835
with:
29-
id: # required
30-
key: # required
31-
secret: # required
32-
workspace: # required
36+
id: # The workspace ID (required)
37+
key: # The workspace API key (required)
38+
secret: # The workspace API secret (required)
39+
workspace: # The path to the workspace JSON file/DSL file(s) (required)
40+
41+
# optional parameters
42+
docs: # The path to the directory containing Markdown/AsciiDoc files to be published (optional)
43+
adrs: # The path to the directory containing ADRs (optional)
44+
url: # The Structurizr API URL (optional; defaults to https://api.structurizr.com)
45+
passphrase: # The passphrase to use (optional; only required if client-side encryption enabled on the workspace)
3346
```
3447
3548
## License

action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: 'structurizr-cli-action'
22
description: 'Runs structurizr command line application'
33
inputs:
4-
command:
5-
description: 'Command argument (optional; defaults to push)'
6-
required: false
7-
default: push
84
id:
95
description: 'The workspace ID (required)'
106
required: true
@@ -34,7 +30,7 @@ runs:
3430
using: 'docker'
3531
image: 'Dockerfile'
3632
args:
37-
- ${{ inputs.command }}
33+
- 'push'
3834
- '-id'
3935
- ${{ inputs.id }}
4036
- '-key'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 1. Record architecture decisions
2+
3+
Date: 2020-11-25
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We need to record the architectural decisions made on this project.
12+
13+
## Decision
14+
15+
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
16+
17+
## Consequences
18+
19+
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 2. Implement as Unix shell scripts
2+
3+
Date: 2020-11-25
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
The issue motivating this decision, and any context that influences or constrains the decision.
12+
13+
## Decision
14+
15+
The change that we're proposing or have agreed to implement.
16+
17+
## Consequences
18+
19+
What becomes easier or more difficult to do and any risks introduced by the change that will need to be mitigated.

tests/doc/docs/example.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Section Title

tests/workspace.dsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
workspace "Getting Started" "This is a model of my software system." {
22

3+
!adrs doc/adr
4+
!docs doc/docs
5+
36
model {
47
user = person "User" "A user of my software system."
58
softwareSystem = softwareSystem "Software System" "My software system."

0 commit comments

Comments
 (0)