Skip to content

V2 #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
22 changes: 15 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Run structurizr-cli action
- name: Run structurizr-cli command [Push]
uses: ./
id: test
id: push
with:
id: ${{ secrets.STZR_ID }}
command: push
workspace_id: ${{ secrets.STZR_ID }}
key: ${{ secrets.STZR_API_KEY }}
secret: ${{ secrets.STZR_API_SECRET }}
workspace_file_param: -workspace
workspace_file: ./tests/workspace.dsl

- name: Run structurizr-cli command [Pull]
uses: ./
id: pull
with:
command: pull
workspace_id: ${{ secrets.STZR_ID }}
key: ${{ secrets.STZR_API_KEY }}
secret: ${{ secrets.STZR_API_SECRET }}
workspace: ./tests/workspace.dsl
url: https://api.structurizr.com
merge: false
archive: false
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This GitHub action allows you to run [structurizr-cli](https://github.com/struct
Currently, the action supports the following functionality:

- __Push__ content to a Structurizr workspace (the cloud service or an on-premises installation)
- __Pull__ content from Structurizr (the cloud service or an on-premises installation)
- A model and views defined using the [Structurizr DSL](https://github.com/structurizr/dsl)
- Markdown/AsciiDoc documentation
- Architecture Decision Records (ADRs)
Expand Down
67 changes: 20 additions & 47 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,28 @@ branding:
icon: 'copy'
color: 'blue'
inputs:
id:
description: 'The workspace ID (required)'
required: true
command:
description: 'Command'
workspace_id:
description: 'The workspace ID'
key:
description: 'The workspace API key (required)'
required: true
description: 'The workspace API key'
secret:
description: 'The workspace API secret (required)'
required: true
workspace:
description: 'The path to the workspace JSON file/DSL file(s) (required)'
required: true
docs:
description: 'The path to the directory containing Markdown/AsciiDoc files to be published (optional)'
required: false
adrs:
description: 'The path to the directory containing ADRs (optional)'
required: false
url:
description: 'The Structurizr API URL (optional; defaults to https://api.structurizr.com)'
required: false
default: 'https://api.structurizr.com'
passphrase:
description: 'The passphrase to use (optional; only required if client-side encryption enabled on the workspace)'
required: false
merge:
description: 'Whether to merge layout information from the remote workspace (optional: defaults to true)'
required: false
archive:
description: 'Whether to store the previous version of the remote workspace (optional; default to true)'
required: false
description: 'The workspace API secret'
workspace_file_param:
description: Static parameter
workspace_file:
description: 'The path to the workspace JSON file/DSL file(s)'
runs:
using: 'docker'
image: 'docker://ghcr.io/aidmax/structurizr-cli-docker:latest'
image: 'docker://structurizr/cli:latest'
args:
- 'push'
- '-id'
- ${{ inputs.id }}
- '-key'
- ${{ inputs.key }}
- '-secret'
- ${{ inputs.secret }}
- '-workspace'
- ${{ inputs.workspace }}
- '-url'
- ${{ inputs.url }}
- '-passphrase'
- ${{ inputs.passphrase }}
- '-merge'
- ${{ inputs.merge }}
- '-archive'
- ${{ inputs.archive }}
- ${{ inputs.command }}
- '-id'
- ${{ inputs.workspace_id }}
- '-key'
- ${{ inputs.key }}
- '-secret'
- ${{ inputs.secret }}
- ${{ inputs.workspace_file_param }}
- ${{ inputs.workspace_file }}
4 changes: 4 additions & 0 deletions tests/workspace.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ workspace "Getting Started" "This is a model of my software system." {
!adrs doc/adr
!docs doc/docs

configuration {
scope softwaresystem
}

model {
user = person "User" "A user of my software system."
softwareSystem = softwareSystem "Software System" "My software system."
Expand Down