diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4ae2a1..8f37850 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,10 +14,11 @@ jobs: uses: ./ id: test with: - id: ${{ secrets.STZR_ID }} + command: push + workspace_id: ${{ secrets.STZR_ID }} key: ${{ secrets.STZR_API_KEY }} secret: ${{ secrets.STZR_API_SECRET }} - workspace: ./tests/workspace.dsl + workspace_file: ./tests/workspace.dsl url: https://api.structurizr.com merge: false archive: false diff --git a/action.yml b/action.yml index 23ebc0d..8cc3f86 100644 --- a/action.yml +++ b/action.yml @@ -5,55 +5,39 @@ 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 + description: 'The workspace API secret' + workspace_file: + description: 'The path to the workspace JSON file/DSL file(s)' docs: - description: 'The path to the directory containing Markdown/AsciiDoc files to be published (optional)' - required: false + description: 'The path to the directory containing Markdown/AsciiDoc files to be published' adrs: - description: 'The path to the directory containing ADRs (optional)' - required: false + description: 'The path to the directory containing ADRs' 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 + description: 'Whether to merge layout information from the remote workspace' archive: description: 'Whether to store the previous version of the remote workspace (optional; default to true)' - required: false runs: using: 'docker' image: 'docker://ghcr.io/aidmax/structurizr-cli-docker:latest' args: - - 'push' - - '-id' - - ${{ inputs.id }} - - '-key' + - ${{ inputs.command }} + - ${{ inputs.workspace_id }} - ${{ inputs.key }} - - '-secret' - ${{ inputs.secret }} - - '-workspace' - - ${{ inputs.workspace }} - - '-url' + - ${{ inputs.workspace_file }} - ${{ inputs.url }} - - '-passphrase' - ${{ inputs.passphrase }} - - '-merge' - ${{ inputs.merge }} - - '-archive' - ${{ inputs.archive }}