name: 'Increase Runner Count'
description: 'Increase the number of runners'
inputs:
  inc:
    description: 'number to increase'
    required: true
  max:
    description: 'maximum allowed'
    required: false
runs:
  using: "composite"
  steps:
    - name: Install kubectl
      uses: azure/setup-kubectl@v3
    - name: Increase runners with ${{ inputs.inc }}
      shell: bash
      run: |
        source ./scripts/kubeconfig-runners.sh
        INC=$((11 * ${{ inputs.inc }} / 10))
        ./scripts/increase-runners.sh $INC ${{ inputs.max }}
        echo "::notice ::Increased runners with $INC"
