Skip to content

Commit b3a134e

Browse files
authored
Merge branch 'main' into anmol/upgrade-readme
2 parents 9a9d982 + 79adfd3 commit b3a134e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

action.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ inputs:
99
description: "Path to the config file"
1010
required: true
1111
cli-version:
12-
description: "Version of @starship-ci/cli to use: default: 3.8.0"
12+
description: "Version of @starship-ci/cli to use: default: 3.10.0"
1313
required: false
14-
default: "3.8.0"
14+
default: "3.10.0"
1515
kubeconfig:
1616
description: "Kubeconfig file for remote cluster, if set, will be used instead of creating kind cluster"
1717
required: false
@@ -89,7 +89,15 @@ runs:
8989
if: ${{ inputs.kubeconfig != '' }}
9090
run: |
9191
mkdir -p ~/.kube
92-
echo -e "${{ inputs.kubeconfig }}" > ~/.kube/config
92+
# If input looks like a file path and exists, copy it
93+
if [ -f ${{ inputs.kubeconfig }} ]; then
94+
echo "Copying kubeconfig from ${{ inputs.kubeconfig }} to ~/.kube/config"
95+
cp -n ${{ inputs.kubeconfig }} ~/.kube/config
96+
else
97+
# Otherwise treat as content
98+
echo "Input appears to be direct kubeconfig content, writing to $HOME/.kube/config"
99+
echo "${{ inputs.kubeconfig }}" > ~/.kube/config
100+
fi
93101
shell: bash
94102

95103
- name: Set namespace
@@ -110,11 +118,6 @@ runs:
110118
env:
111119
INPUT_NAMESPACE: ${{ inputs.namespace }}
112120

113-
- name: Create namespace if nonexistent
114-
run: |
115-
kubectl create namespace ${{ steps.set-namespace.outputs.namespace }} || true
116-
shell: bash
117-
118121
- name: Setup starshipjs client
119122
if: inputs.cli-version != '0.0.0' # Skip if cli-version is 0.0.0, expected to be used for local testing
120123
run: |

0 commit comments

Comments
 (0)