Skip to content

Commit

Permalink
Do not hardcode arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
aidmax committed Jan 15, 2024
1 parent 49307c6 commit 0677137
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 65 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ jobs:
uses: ./
id: push
with:
command: push
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
args: |
push
-id ${{ secrets.STZR_ID }}
-key ${{ secrets.STZR_API_KEY }}
-secret ${{ secrets.STZR_API_SECRET }}
-workspace ./tests/workspace.dsl
- name: Run structurizr-cli action pull command
uses: ./
id: pull
with:
command: pull
id: ${{ secrets.STZR_ID }}
key: ${{ secrets.STZR_API_KEY }}
secret: ${{ secrets.STZR_API_SECRET }}
url: https://api.structurizr.com
args: |
pull
-id ${{ secrets.STZR_ID }}
-key ${{ secrets.STZR_API_KEY }}
-secret ${{ secrets.STZR_API_SECRET }}
55 changes: 3 additions & 52 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,60 +5,11 @@ branding:
icon: 'copy'
color: 'blue'
inputs:
command:
description: 'The command (required)'
required: true
id:
description: 'The workspace ID (required)'
required: true
key:
description: 'The workspace API key (required)'
required: true
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
default: ''
merge:
description: 'Whether to merge layout information from the remote workspace (optional: defaults to true)'
required: false
default: ''
archive:
description: 'Whether to store the previous version of the remote workspace (optional; default to true)'
args:
description: 'Arguments to be passed'
required: false
default: ''
runs:
using: 'docker'
image: 'docker://ghcr.io/aidmax/structurizr-cli-docker:latest'
args:
- ${{ inputs.command }}
- '-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.args }}

0 comments on commit 0677137

Please sign in to comment.