From c82ee7be4ddc1d1bddb996056b432724c0531ff8 Mon Sep 17 00:00:00 2001 From: Bryan Latten Date: Sat, 18 Dec 2021 22:00:30 -0500 Subject: [PATCH] CI: fallback without socket --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d39f82..a8eb071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,14 +32,15 @@ jobs: v=$(mount | grep "/run/docker.sock") TARGET_HOST= - if [ -n "$v" ]; then + if [[ -n "$v" ]]; then echo "Injected docker socket detected" TARGET_HOST="host.docker.internal" - elif [ -S /var/run/docker.sock ]; then + elif [[ -S /var/run/docker.sock ]]; then + echo "Local docker socket detected" TARGET_HOST="localhost" else - echo "No Docker socket detected, fail" - exit 1 + echo "No docker socket detected, falling back" + TARGET_HOST="localhost" fi echo "TARGET_HOST=${TARGET_HOST}" >> $GITHUB_ENV -