name: 'Speckle Automate Function Publisher'
description: 'Builds and publishes a Speckle Automate Function to the Speckle Server.'
author: 'Speckle Systems'
branding:
  icon: 'upload-cloud'
  color: 'blue'
inputs:
  speckle_automate_url:
    description: 'Speckle Automate Server URL.'
    required: false
    default: 'https://automate.speckle.dev'
  speckle_token:
    description: 'Token for authentication to Speckle Automate Server, allowing publishing of Speckle Functions. **The token must be stored in GitHub as an encrypted secret**.'
    required: true
  speckle_function_path:
    description: 'Path to the Speckle Function definition (`specklefunction.yaml`) to be published.'
    required: false
    default: '.' # root directory of the checked out source code, ${GITHUB_WORKSPACE}
  speckle_function_id:
    description: 'The unique identifier of the function. Go to automate to generate one.'
    required: true
  speckle_function_input_schema:
    description: 'JSON Schema of the parameters object required by the function.'
    required: false
  speckle_function_command:
    description: 'The command to run to execute the function in a runtime environment.'
    required: true
outputs:
  version_id:
    description: 'The unique identifier of the function version.'
  speckle_automate_host:
    description: 'The host component of the Speckle Automate Server URL.'
runs:
  using: 'node16' #FIXME bump to node18 when available
  main: 'dist/action/index.js'
