DE kubectl get nodes test #11
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 | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/.kube | |
echo ${{ secrets.KUBE_CONFIG }} | base64 --decode > $GITHUB_WORKSPACE/.kube/config | |
export KUBECONFIG=$GITHUB_WORKSPACE/.kube/config | |
echo "$GITHUB_WORKSPACE/.kube/config" | |
echo "$(cat "$GITHUB_WORKSPACE/.kube/config")" | |
- name: Use context | |
run: kubectl config use-context kubernetes-admin-visoft.solutions.cluster@visoft.solutions.cluster | |
- name: Deploy to K8s | |
run: kubectl get nodes |