diff --git a/action.yml b/action.yml index 5ccf165..c36e337 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,9 @@ inputs: deploy-env: description: Deploy Environment (ci or edge) required: true + kubeconfig: + description: Kubeconfig for Oasis + required: false garden-version: description: Version of Garden to deploy required: false @@ -42,10 +45,12 @@ runs: - name: Configure Kubeconfig shell: bash run: | - if [ ${{ inputs.deploy-env }} == "edge" ]; then + if [ ${{ inputs.deploy-env }} == "edge" && -z ${{ inputs.kubeconfig }} ]; then echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_EDGE}} >> $GITHUB_ENV - elif [ ${{ inputs.deploy-env }} == "ci" ]; then + elif [ ${{ inputs.deploy-env }} == "ci" && -z ${{ inputs.kubeconfig }} ]; then echo OASIS_WORKFLOW_KUBECONFIG=${{env.KUBERNETES_CONFIG_USW_DEV}} >> $GITHUB_ENV + elif [ -n ${{ inputs.kubeconfig }} ]; then + echo OASIS_WORKFLOW_KUBECONFIG=${{ inputs.kubeconfig }} >> $GITHUB_ENV else echo "Error! deploy-env required, and must be 'ci' or 'edge'!" exit 1