diff --git a/.github/workflows/setup-cluster.yml b/.github/workflows/setup-cluster.yml index 86ba7b0..86db511 100644 --- a/.github/workflows/setup-cluster.yml +++ b/.github/workflows/setup-cluster.yml @@ -26,7 +26,9 @@ jobs: uses: medyagh/setup-minikube@latest - name: kubectl run: kubectl get pods -A -o wide - - name: Setup cluster + - shell: bash + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} run: | ./run.sh - name: kubectl diff --git a/setup-cluster b/setup-cluster index e6e3258..b0e8274 100755 --- a/setup-cluster +++ b/setup-cluster @@ -37,14 +37,19 @@ readonly TF_FORCE_LOCAL VERBOSE=0 readonly VERBOSE +minikube_driver="podman" + +if [[ $(grep '^ID=' /etc/os-release | awk -F'=' '{print $2}') == "ubuntu" ]]; then + minikube_driver="docker" +fi # Start minikube if ! $(minikube status) or $(minikube status | grep Nonexistent\|Stopped); then printf 'minikube is not running\nStarting minikube..' if (( 0=="${VERBOSE}" )); then - minikube start --driver=podman + minikube start --driver="${minikube_driver}" else - minikube start --driver=podman --alsologtostderr -v=7 + minikube start --driver="${minikube_driver}" --alsologtostderr -v=7 fi else printf 'minikube is already running\n'