name: 'Decrease Runner Count'
description: 'Decrease the number of runners'
inputs:
  dec:
    description: 'number to decrease'
    required: true
  min:
    description: 'minimum number of runners'
    required: false
runs:
  using: "composite"
  steps:
    - name: Install kubectl
      uses: azure/setup-kubectl@v3
    - name: Decrease runners with ${{ inputs.dec }}
      shell: bash
      run: |
        source ./scripts/kubeconfig-runners.sh
        ./scripts/decrease-runners.sh ${{ inputs.dec }} ${{ inputs.min }}
        echo "::notice ::Runners decreased with ${{ inputs.dec }}"
