restructure

This commit is contained in:
2026-05-29 11:16:00 -04:00
parent abeb9d04d0
commit 1ffe0c23cb
27 changed files with 14 additions and 14 deletions
+23
View File
@@ -0,0 +1,23 @@
# Configure Kubectl
<!-- action-docs-description source="action.yml" -->
## Description
Configure kubectl for use with Kubernetes
<!-- action-docs-description source="action.yml" -->
<!-- action-docs-inputs source="action.yml" -->
## Inputs
| name | description | required | default |
| --- | --- | --- | --- |
| `K8S_CONFIG` | <p>The RAW Kubernetes config</p> | `true` | `""` |
| `K8S_NAMESPACE` | <p>The K8S namespace</p> | `true` | `""` |
| `K8S_CONTEXT` | <p>The K8S context</p> | `true` | `""` |
<!-- action-docs-inputs source="action.yml" -->
<!-- action-docs-runs source="action.yml" -->
## Runs
This action is a `composite` action.
<!-- action-docs-runs source="action.yml" -->
+33
View File
@@ -0,0 +1,33 @@
name: Configure Kubectl
description: Configure kubectl for use with Kubernetes
inputs:
K8S_CONFIG:
description: "The RAW Kubernetes config"
required: true
K8S_NAMESPACE:
description: "The K8S namespace"
required: true
K8S_CONTEXT:
description: "The K8S context"
required: true
runs:
using: composite
steps:
- name: Configure kubectl
shell: sh
run: |
echo "Remove existing kubeconfig"
rm -f ~/.kube/config
echo "Re-creating .kube directory"
mkdir -p ~/.kube
echo "Set kubeconfig"
echo "${{ inputs.K8S_CONFIG }}" > ~/.kube/config
echo "Set kubeconfig context"
kubectl config set-context ${{ inputs.K8S_CONTEXT }} --cluster=${{ inputs.K8S_CONTEXT }} --namespace=${{ inputs.K8S_NAMESPACE }}
echo "Use kubeconfig context ${{ inputs.K8S_CONTEXT }}"
kubectl config use-context ${{ inputs.K8S_CONTEXT }}