DE kubectl get nodes test #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dynamic Enviroment | |
on: | |
push: | |
branches: ["development"] | |
pull_request: | |
branches: ["development"] | |
jobs: | |
deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Create kubeconfig | |
env: | |
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }} | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/.kube | |
echo "$KUBE_CONFIG" | base64 --decode > $GITHUB_WORKSPACE/.kube/config | |
export KUBECONFIG="$GITHUB_WORKSPACE/.kube/config" | |
echo "$KUBECONFIG" | |
- name: Use context | |
run: kubectl config use-context kubernetes-admin-visoft.solutions.cluster@visoft.solutions.cluster | |
- name: Deploy to K8s | |
run: kubectl get nodes |