use k3s command #2
Workflow file for this run
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: Setup k3s | |
on: | |
push: | |
tags: | |
- "k3s*" | |
jobs: | |
setup-k3s: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install k3s | |
run: | | |
curl -sfL https://get.k3s.io | sh - | |
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml | |
echo 'export KUBECONFIG=/etc/rancher/k3s/k3s.yaml' >> $GITHUB_ENV | |
- name: Wait for k3s to be ready | |
run: | | |
for i in {1..10}; do | |
k3s kubectl get nodes && break || sleep 10; | |
done | |
- name: Deploy to k3s | |
run: | | |
k3s kubectl apply -f deploy/cert-manager.yaml | |
k3s kubectl apply -f deploy/operator.yaml | |