name: mc
description: "Run MinIO Client mc commands."
inputs:
  command:
    description: "Arguments to pass into mc."
    required: true
  alias:
    description: "S3 alias."
    required: true
    default: s3
  url:
    description: "S3 URL."
    required: true
    default: https://s3-us-gov-west-1.amazonaws.com
  accessKey:
    description: "S3 access key."
    required: true
  secretKey:
    description: "S3 secret key."
    required: true
  catchErrors:
    description: "Whether or not errors should be handled."
    required: false
outputs:
  console:
    description: "The console output of the mc command."
  exitCode:
    description: "How the program exited."
runs:
  using: docker
  image: Dockerfile
  env:
    CATCH_ERRORS: ${{ inputs.catchErrors }}
    S3_URL: ${{ inputs.url }}
    S3_ALIAS: ${{ inputs.alias }}
    S3_ACCESS_KEY_ID: ${{ inputs.accessKey }}
    S3_SECRET_ACCESS_KEY: ${{ inputs.secretKey }}
  args:
  - ${{ inputs.command }}
