I have this main.yml workflow right here:
name: Testing
on:
push:
branches:
- main
jobs:
upgrade-kubectl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install kubectl version
uses: ./.github/actions/promote-image
with:
kubectl: 'latest'
and my action.yml metadata file:
name: "Helm, Kubectl or Devspace installation setup"
description: "Install a specific version of Helm, Kubectl or Devspace. Acceptable values are latest or version strings like 1.15.0"
inputs:
kubectl:
description: "Version of Kubectl"
required: false
helm:
description: "Version of Helm"
required: false
devspace:
description: "Version of Devspace"
required: false
runs:
using: "composite"
steps:
- name: Setting up kubectl
uses: azure/setup-kubectl@v1
with:
version: ${{ inputs.kubectl }}
- name: Setting up Helm
uses: azure/setup-helm@v1
with:
version: ${{ inputs.helm }}
- name: Setting up Devspace
uses: loft-sh/setup-devspace@main
with:
version: ${{ inputs.devspace }}
Currently I am just supplying the kubectl version in my workflow, but when the action is triggered it is running all 3 steps instead.
How do I make it so that if I supply one version it only runs the one step, supply two version it runs two steps respectively, etc.
Any help would be appreciated !