name: 'Run woke'
description: >-
  Run woke on pull requests to detect non-inclusive language
  in your source code.
author: 'Caitlin Elfring (caitlinelfring)'
inputs:
  github-token:
    description: 'GITHUB_TOKEN'
    required: true
    default: ${{ github.token }}
  woke-args:
    description: 'woke arguments'
    default: '.'
    required: false
  fail-on-error:
    description: |
      Exit code when errors are found [true,false]
      Default is `false`.
    default: 'false'
    required: false
  workdir:
    description: 'Working directory relative to the root directory.'
    default: '.'
    required: false
  woke-version:
    description: >-
      woke version, defaults to the latest `v0` version.
      Override to pin to a specific version
    default: 'v0'
    required: false
runs:
  using: 'composite'
  steps:
    - run: $GITHUB_ACTION_PATH/entrypoint.sh
      shell: bash
      env:
        # INPUT_<VARIABLE_NAME> is not available in Composite run steps
        # https://github.com/actions/runner/issues/665
        INPUT_GITHUB_TOKEN: ${{ inputs.github-token }}
        INPUT_WOKE_VERSION: ${{ inputs.woke-version }}
        INPUT_WOKE_ARGS: ${{ inputs.woke-args }}
        INPUT_FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
        INPUT_WORKDIR: ${{ inputs.workdir }}
branding:
  icon: 'check-circle'
  color: 'gray-dark'
