name: "runner docker Centreon"
description: "runner docker Centreon"
inputs:
  registry_url:
    description: Docker registry url
    required: true
  script_name:
    description: "script name"
    required: true
  image_name:
    description: "image name"
    required: true
  image_version:
    description: "image version"
    required: true
  env_variable:
    description: "environnment variable"
    required: false
  params:
    description: "params for script"
    required: false

runs:
  using: "composite"
  steps:
    - run: docker run -i --entrypoint ${{ inputs.script_name }}.sh -v "$PWD:/src" ${{ inputs.env_variable }} ${{ inputs.registry_url }}/${{ inputs.image_name }}:${{ inputs.image_version}} ${{ inputs.params }}
      shell: bash
