From 27727c664b6f74f98655aa8ccc9eaea66919b83f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Thu, 11 Jan 2024 22:37:42 +0100 Subject: [PATCH] CI: Use docker driver for mk on Ubuntu --- .github/workflows/setup-cluster.yml | 4 +++- setup-cluster | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) 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'