CI: Use docker driver for mk on Ubuntu

This commit is contained in:
Björn Busse 2024-01-11 22:37:42 +01:00
parent 7affe70fac
commit 27727c664b
2 changed files with 10 additions and 3 deletions

View File

@ -26,7 +26,9 @@ jobs:
uses: medyagh/setup-minikube@latest uses: medyagh/setup-minikube@latest
- name: kubectl - name: kubectl
run: kubectl get pods -A -o wide run: kubectl get pods -A -o wide
- name: Setup cluster - shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: | run: |
./run.sh ./run.sh
- name: kubectl - name: kubectl

View File

@ -37,14 +37,19 @@ readonly TF_FORCE_LOCAL
VERBOSE=0 VERBOSE=0
readonly VERBOSE readonly VERBOSE
minikube_driver="podman"
if [[ $(grep '^ID=' /etc/os-release | awk -F'=' '{print $2}') == "ubuntu" ]]; then
minikube_driver="docker"
fi
# Start minikube # Start minikube
if ! $(minikube status) or $(minikube status | grep Nonexistent\|Stopped); then if ! $(minikube status) or $(minikube status | grep Nonexistent\|Stopped); then
printf 'minikube is not running\nStarting minikube..' printf 'minikube is not running\nStarting minikube..'
if (( 0=="${VERBOSE}" )); then if (( 0=="${VERBOSE}" )); then
minikube start --driver=podman minikube start --driver="${minikube_driver}"
else else
minikube start --driver=podman --alsologtostderr -v=7 minikube start --driver="${minikube_driver}" --alsologtostderr -v=7
fi fi
else else
printf 'minikube is already running\n' printf 'minikube is already running\n'